Sunday, 15 April 2012

Need to add toggle effect to this: jQuery("ul.tabs-nav").tabs("> .pane"); -


Good day, I'm new to javascript and I'm editing a WordPress website, I need to add toggle effect This line is:

jQuery ("ul.tabs-nav"). Tab ("& gt; .pane");

I did some research and found tabs: ({fx: {height: 'toggle', opacity: 'toggle'}});

but I do not have any idea about how to add it without removing "& gt; .pane"

Code I have a wordpress theme (PHP):

  $ out = '& lt; Script type = "text / javascript" & gt; JQuery (document) .ready (function ($) {jQuery ("ul.tabs-nav"). Tab ("& gt; .pane");}); & Lt; / Script & gt; & Lt; Div class = "post-tabs". $ Type '' & Gt; '.do_shortcode ($ content).' & Lt; / Div & gt; '; Return $ out;   

Thanks advance!

I'm a little bit of a beginner, but lately how do I have to do it.

Add {show: {effect: "blind", duration: 1000}, hide: {effect: "blind", duration: 1000}} in your tab () like this:

  $ out = '& lt; Script type = "text / javascript" & gt; JQuery (document) .ready (function ($) {jQuery ("ul.tabs-nav"). Tab ({show: {effect: "blind", duration: 1000}, hide: {effect: "blind", period : 1000})}); & Lt; / Script & gt; & Lt; Div class = "post-tabs". $ Type '' & Gt; '.do_shortcode ($ content).' & Lt; / Div & gt; '; Return $ out;   

I excluded "& gt; .pane" because I do not know how to include it with the correct syntax.

No comments:

Post a Comment