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

Dylan Kuhn dylankkuhn at gmail.com
Fri Jun 19 10:49:31 GMT 2009


Good. Just for clarity, I think the only necessary code is the content of
you create_ui_tabs function. jQuery( function() { } ) is a shortcut for
jQuery(document).ready( function() { } ) - maybe a good example of how
shortcuts can reduce readbility.

Secondly, I agree with Heiko that testing the UI version is probably more
robust, since tabs() is UI code. I also agree with Ozh that not using tabs
at all is much more robust :). I'll probably use a compromise myself for
now.

-dylan-

On Fri, Jun 19, 2009 at 3:49 AM, Daiv Mowbray <daiv at daivmowbray.com> wrote:

> Correction to my last post:
>
> It seems that I failed to update cache or something.
> This following does work for 2.7 and 2.8 :
> ______________________
>
>  <script type="text/javascript">
> // <![CDATA[
>
> 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();
> });
>
> // ]]>
> </script>
> __________________________
>
>
>
> On Jun 19, 2009, at 10:44 AM, Daiv Mowbray wrote:
>
>  Hi thanx for the feedback, and well, I'm perplexed.
>> I've applied the jquery as such;
>>
>
>
> ----------
> Daiv Mowbray
> daiv at daivmowbray.com
> ----------
>
>
> _______________________________________________
> 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