Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter signcarver

    (@signcarver)

    OK – found a fix from an old post
    I went to Settings > WP UI > Advanced and unchecked Demand Load Scripts

    @signcarver just an FYI your FAQ page is not rendering an accordion in IE.

    Thread Starter signcarver

    (@signcarver)

    @rezon8dev – Thank you. I see that also – i will investigate.

    Thanks for the heads up!

    Works fine in Opera, Chrome and Safari.

    Why is IE always the exception…

    usually because some value has not been defined or set, it usually likes everything to be declared. But the issue with this plugin has to do with the below function throwing this error:

    Unable to get value of the property ‘ajaxClass’: object is null or undefined
    script block (14), line 40 character 6:

    Any help would be great!

    (function( $ ) {
    
    	////////////////////////////////////////////////////
    	//////////////////// WP Accordion //////////////////
    	///////////////////////////////////////////////////
    	$.widget( 'wpui.wpaccord', {
    		options			: {
    			header			: 	'h3.wp-tab-title',
    			content			: 	'div.wp-tab-content',
    			ajaxClass		: 	'a.wp-tab-load',
    			effect			: 	(typeof wpUIOpts != "undefined") ? wpUIOpts.accordEffect : '',
    			autoHeight		: 	(typeof wpUIOpts != "undefined"  && wpUIOpts.accordAutoHeight == 'on' ) ? true : false,
    			collapse		: 	(typeof wpUIOpts != "undefined"  && wpUIOpts.accordCollapsible == 'on' ) ? true : false,
    			easing			: 	(typeof wpUIOpts != "undefined" ) ? wpUIOpts.accordEasing : '',
    			accordEvent		:   ( typeof wpUIOpts != "undefined" ) ? wpUIOpts.accordEvent : '',
    			wpuiautop		: 	true,
    			hashChange 		: 	true,
    			template		: 	'<div class="wp-tab-content"><div class="wp-tab-content-wrapper">{$content}</div></div>'
    		},
    		_create			: function() {
    			self = this;
    			$this = this.element;
    			this.o = this.options;
    			this.header = $this.find( this.o.header );
    			this.id = $this.attr( 'id' );
    
    			if ( this.o.wpuiautop ) {
    				$this.find('p, br')
    					.not( this.o.content + ' > br, ' + this.o.content + '.wp-tab-content > p' )
    					.filter(function() {
    						return( $.trim( $(this).html() ) === '' );
    				}).remove();
    			}
    
    			$this.find( this.o.header + ',' + this.o.content ).wrapAll( '<div class="accordion" />' );
    
    			this.header.each( function() {
    				var elId = $( this ).text(),
    					toLoad = $( this ).children( self.o.ajaxClass ),
    					img = $( this ).find( 'img' ),
    					linkStr = '';
    
    				elId = $.wpui.getIds( elId, self.id );
    
    				$( this )
    					// .next()
    					.attr( 'id', elId );
    
    				if ( toLoad.length ) {
    					$( '<div />' )
    					.load( toLoad.attr( 'href' ), function( data ) {
    						$( this ).html( self.o.template.replace( /\{\$content\}/, data ) );
    					})
    					.insertAfter( this );
    				}
    
    			});
    
    		},
    		_init			: function() {
    			var options = {}, accClass;
    
    			options.autoHeight = this.o.autoHeight ? true : false;
    
    			if ( this.o.collapsible ) {
    				options.collapsible = true;
    				options.active = false;
    			}
    
    			if ( this.o.easing ) options.animated = this.o.easing;
    
    			options.event = this.o.accordEvent;
    
    			this.accordion = $this.children( '.accordion' ).accordion( options );
    
    			accClass = $this.attr( 'class' );
    
    			if ( activePanel = accClass.match(/acc-active-(\d){1}/im) ) {
    				this.accordion.accordion( 'activate', parseInt( activePanel[ 1 ], 10 ) );
    			}			
    
    			if ( $this.hasClass( 'wpui-sortable' ) ) {
    				this.header.each(function() {
    					$( this ).wrap( '<div class="acc-group" />' );
    					$( this ).parent().next().insertAfter( this );
    				});
    
    				this.accordion
    				.accordion({
    					header: "> div.acc-group > " + self.o.header
    				}).sortable({
    					handle : self.o.header,
    					axis	: 'y',
    					stop: function( event, ui ) {
    							ui.item.children( "h3" ).triggerHandler( "focusout" );
    						}
    				});
    
    			}
    
    			// Auto rotate the accordions
    			this.rotate();
    
    			if ( typeof( $.wpui.ids.children ) == 'undefined' )
    				$.wpui.ids.children = {};
    			$this.find( '.wp-tab-content-wrapper' ).contents().each(function() {
    				if ( this.id )
    					$.wpui.ids.children[ this.id ] = $( this ).closest( '.ui-accordion-content' ).attr('id');
    
    			});		
    
    		},
    		_setOption		: function( key, value ) {
    			switch( key ) {
    				case "destroy":
    					this.destroy();
    					break;
    
    			}
    
    			$.Widget.prototype._setOption.apply( this, arguments );
    		},
    		rotate		: function() {
    
    			var self = this, rSpeed = this.element.attr( 'class' ).match( /tab-rotate-(.*)/, "$1" ), aRot, rotac;
    
    			if ( rSpeed ) {
    				rSpeed =  rSpeed[1];
    				if ( rSpeed.match(/(\d){1,2}s/, "$1") ) rSpeed = rSpeed.replace(/s$/, '') * 1000;
    				cPanel = this.accordion.accordion( 'option', 'active' );
    				tPanel = this.accordion.children().length / 2 -1;
    
    				rotac = setInterval(function() {
    					self.accordion.accordion( 'activate', ( cPanel > tPanel ) ? 0 : cPanel++ );
    				}, rSpeed );
    
    				self.accordion.children(":nth-child(odd)").bind( 'click', function() {
    					clearInterval( rotac );
    				});
    			}
    
    		},
    		destroy		: function() {
    
    			this.header.unwrap();
    
    			this.header.attr( 'class', this.o.header.replace( /.{1,6}\./, '' ) );
    			this.header.siblings( this.o.content ).attr( 'class', this.o.content.replace( /.{1,6}\./, '' ) ).removeAttr( 'id' ).show();
    
    			$.Widget.prototype.destroy.call( this );
    		}
    
    	});
    
    })( jQuery );

    I can’t get this to work on WordPress 3.5 either https://mossadvertising.com.au/clients/hudson/baking-ingredients/

    Found the problem, it conflicts with Widgetkit by Yootheme. I assume they are both loading Jquery, that is usually the problem.

    Simple Real Estate Pack also loads Jquery and is causing conflicts. Any idea what should be done?

    Thread Starter signcarver

    (@signcarver)

    I have tried to contact the author (Kavin) via his site’s contact page (https://kav.in/contact/) but when you submit your contact form, the site just spins. I also posted on his Facebook page. (I see that mirefoot did also).

    I had the same problem, and it was resolved by the ‘Old Version’ (Use old scripts instead of the rewritten API) checkbox in WP UI Settings -> Advanced. I had this checked because it is seemingly the only way to enable collapsible accordions. Now I’m having the issue of my accordions not collapsing. Crap.

    WP UI breaks all my accordion menus in the WP backend. As far as I can say, it’s since the 3.5 update. I can only deactivate the plugin to get the backend menus working again. I tried all solutions, mentioned above. Anyone else with this issue?

    I pay someone to get this working again . . .

    Please try https://jobs.wordpress.net/

    This topic has now been closed as per the Forum Rules

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘0.8.5 WP UI does not work with WordPress 3.5’ is closed to new replies.