Posted By

ardissoebrata on 11/06/08


Tagged

link jquery tabs ui


Versions (?)

jQuery UI tab - onselect goto link


 / Published in: JavaScript
 

Go to link location when tab clicked (or selected actually) using 'select' event.

  1. <script language=Javascript>
  2. $(document).ready(function(){
  3. $("#theTab").tabs({
  4. select: function() {
  5. window.location.href = $(this).attr('href'); //go to link from a tag.
  6. }
  7. });
  8. });
  9. </script>
  10.  
  11. Tab format:
  12. <ul id="theTab">
  13. <li><a href="{link}"><span>{label}</span></a></li>
  14. </ul>

Report this snippet  

You need to login to post a comment.