[wp-trac] [WordPress Trac] #18690: Change the display layout of help tabs

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 18 01:06:37 UTC 2011


#18690: Change the display layout of help tabs
----------------------------+------------------
 Reporter:  jane            |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.3
Component:  UI              |     Version:  3.3
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |
----------------------------+------------------

Comment (by mbijon):

 Hacked on this @ #wcpdx. Two others were doing:
 * content output from add_contextual_help()
 * CSS formatting

 Tab JS wasn't decided, but I can't work on it tomorrow. Here's my
 suggested method for common.dev.js. Needs corrected id|classes (from,
 http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/):

 {{{

 $(document).ready(function() {

         //When page loads...
         $(".tab_content").hide(); //Hide all content
         $("ul.tabs li:first").addClass("active").show(); //Activate first
 tab
         $(".tab_content:first").show(); //Show first tab content

         //On Click Event
         $("ul.tabs li").click(function() {

                 $("ul.tabs li").removeClass("active"); //Remove any
 "active" class
                 $(this).addClass("active"); //Add "active" class to
 selected tab
                 $(".tab_content").hide(); //Hide all tab content

                 var activeTab = $(this).find("a").attr("href"); //Find the
 href attribute value to identify the active tab + content
                 $(activeTab).fadeIn(0); //Show content from active ID,
 0=>instant
                 return false;
         });

 });
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18690#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list