[wp-hackers] How do you get jQuery tabs working in Wordpress 2.8?
Dylan Kuhn
dylankkuhn at gmail.com
Thu Jun 18 13:28:27 GMT 2009
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 at planetozh.com> 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 at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list