Title: Link to Tab through javascript
Last modified: August 21, 2016

---

# Link to Tab through javascript

 *  Resolved [dietcode](https://wordpress.org/support/users/dietcode/)
 * (@dietcode)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/link-to-tab-through-javascript/)
 * Is there a way to link directly to a tab through javascript?
 * I know you can browse through tabs using anchor tags with the `wpui-tabs-nav-
   next` and `wpui-tabs-nav-prev` classes but you can’t link to a tab number.
 * [http://wordpress.org/plugins/wp-ui/](http://wordpress.org/plugins/wp-ui/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [dietcode](https://wordpress.org/support/users/dietcode/)
 * (@dietcode)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/link-to-tab-through-javascript/#post-4555212)
 * Just for anyone that may find this, I worked it out by doing this:
 *     ```
       $("#tab-5").on("click", function(e){
           e.preventDefault();
           e.stopPropagation();
           $("#ui-id-5").click();
       });
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Link to Tab through javascript’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-ui_dda563.svg)
 * [WP UI - Tabs, Accordions, Sliders](https://wordpress.org/plugins/wp-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-ui/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [dietcode](https://wordpress.org/support/users/dietcode/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/link-to-tab-through-javascript/#post-4555212)
 * Status: resolved