« Return to Thread: How do you get jQuery tabs working in Wordpress 2.8?

Re: How do you get jQuery tabs working in Wordpress 2.8?

by Dylan Kuhn-2 :: Rate this Message:

Reply to Author | View in Thread

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:

    jQuery(function() {
        var selector = '#tabs-container';
        if ( typeof jQuery.prototype.selector === 'undefined' ) {
            // We have jQuery 1.2.x, tabs work better on UL
            selector += ' > ul';
        }
        jQuery( selector ).tabs();

-dylan-

On Thu, Jun 18, 2009 at 5:19 AM, Ozh <ozh@...> wrote:

> >
> > init_my_script();
> >
>
> jQuery(document).ready(function(){
>         init_my_script();
> });
> might change if the error is because you're firing the init before
> jquery-tabs have loaded (they're in the footer now, remember)
>
> Ozh
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

 « Return to Thread: How do you get jQuery tabs working in Wordpress 2.8?