[wp-hackers] How do you get jQuery tabs working in Wordpress 2.8?

Daiv Mowbray daiv at daivmowbray.com
Fri Jun 19 08:44:24 GMT 2009


Hi thanx for the feedback, and well, I'm perplexed.
I've applied the jquery as such;

function create_ui_tabs() {

    jQuery(function() {
         var selector = '#ssslider';
             if ( typeof jQuery.prototype.selector === 'undefined' ) {
            		 // We have jQuery 1.2.x, tabs work better on UL
             	selector += ' > ul';
         	}
         jQuery( selector ).tabs({ fxFade: true, fxSpeed: 'slow' });

     });
};

jQuery(document).ready(function(){
         create_ui_tabs();
});
____________________________________

and my html is:

<div id="ssslider" class="ui-tabs">
     <ul id="ssnav" class="ui-tabs-nav">
         <li class="ui-tabs-selected"><a  
href="#fragment-1"><span>Global Options</span></a></li>
         <li class="ui-state-default"><a  
href="#fragment-2"><span>Plugins Appearance</span></a></li>
         <li class="ui-state-default" style="display: none;"><a  
href="#fragment-9"><span>Comment Slider</span></a></li>
     </ul>
     <div id="fragment-1" class="ui-tabs-panel">
...




On Jun 18, 2009, at 3:29 PM, Dylan Kuhn wrote:

> I found by experimenting that in jQuery 1.3.x I have to select the  
> container
> of the tab UL, whereas in 1.2.x I had been selecting the UL itself. My
> attempt (not claiming best practice) at code to work in both is  
> something
> like:


----------
Daiv Mowbray
daiv at daivmowbray.com
----------




More information about the wp-hackers mailing list