[wp-trac] [WordPress Trac] #18909: Bundled jQuery UI should have CSS
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 13 22:04:57 UTC 2012
#18909: Bundled jQuery UI should have CSS
-----------------------------------+------------------------------
Reporter: helenyhou | Owner:
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.3
Severity: normal | Resolution:
Keywords: ui-feedback has-patch |
-----------------------------------+------------------------------
Comment (by aaroncampbell):
Thanks to @helenyhou for pointing me to this ticket. I completely missed
it and opened #20035 just for tabs. To replicate the tabs used for
categories etc all you need is the right HTML/classes and the small
[attachment:18909.2.diff] which adds `ui-tabs-selected` to the styles
where `wp-tab-active` currently is. Then just do something like this:
{{{
<script>
jQuery(function($) {
$( '.tabbed-content' ).tabs();
});
</script>
<div class="tabbed-content">
<ul class="wp-tab-bar">
<li class="ui-tabs-selected"><a href="#tabs-
one">One</a></li>
<li><a href="#tabs-two">Two</a></li>
<li><a href="#tabs-three">Three</a></li>
</ul>
<div id="tabs-one" class="wp-tab-panel ui-tabs-hide">
Tab One Content
</div>
<div id="tabs-two" class="wp-tab-panel ui-tabs-hide">
Tab Two Content
</div>
<div id="tabs-three" class="wp-tab-panel ui-tabs-hide">
Tab Three Content
</div>
</div>
}}}
Of course that assumes you've already done `wp_enqueue_script( 'jquery-ui-
tabs' );`
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18909#comment:45>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list