Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-14-2012, 06:48 PM   PM User | #1
lemecoding
New to the CF scene

 
Join Date: May 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
lemecoding is an unknown quantity at this point
Bootstrap Tabs - Show/Hide on Hover

I changed the bootstrab.js (just replaced click with hover):

Code:
  $(function () {
    $('body').on('hover.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
      e.preventDefault()
      $(this).tab('show')
    })
  })
and a script like that:

Code:
$('#content_tab').bind('mouseleave', function(){
    if ($('#tab_button').hasClass('active'))
            $('#tab_button').removeClass('active');
                if ($('#content_tab').hasClass('active'))
            $('#content_tab').removeClass('active');
    return false;
});
Its working so far but there is one problem. When not hovering over the content-div or another nav-tab after hovering over the desired nav-tab , it stays open/active. Like in a horizontal menu you hover over the 1st (most left) tab and then go out to the left.
jsFiddle to illustrate: http://jsfiddle.net/WnQvF/27/

Can anyone help me to finish that menu? I am thankful for every solution!
lemecoding is offline   Reply With Quote
Reply

Bookmarks

Tags
bootstrap, hide, hover, javascript, show

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:14 PM.


Advertisement
Log in to turn off these ads.