I found that just replacing delay() and fade*() by show() and hide() solve
most problem.

Here the code :
// this code improves bootstrap menus and adds dropdown support
jQuery(function(){
  jQuery('.nav>li>a').each(function(){
    if(jQuery(this).parent().find('ul').length)

jQuery(this).attr({'class':'dropdown-toggle','data-toggle':'dropdown'}).append('<b
class="caret"></b>');
  });
  jQuery('.nav li li').each(function(){
    if(jQuery(this).find('ul').length)
      jQuery(this).addClass('dropdown-submenu');
  });
  function hoverMenu(){
    var wid = document.documentElement.clientWidth; //faster than
$(window).width() and cross browser
    if (wid>=980){
        jQuery('ul.nav a.dropdown-toggle').parent().hover(function(){
            mi = jQuery(this).addClass('open');
            mi.children('.dropdown-menu').stop(true, true).show();
        }, function(){
            mi = jQuery(this);
            mi.children('.dropdown-menu').stop(true, true).hide(0,
function(){mi.removeClass('open')});
        });
    };
  }
  hoverMenu(); // first page load
  jQuery(window).resize(hoverMenu); // on resize event
  jQuery('ul.nav li.dropdown
a').click(function(){window.location=jQuery(this).attr('href');});
  // make all buttons bootstrap buttons
  jQuery('button, form input[type="submit"], form
input[type="button"]').addClass('btn');
});

Richard


On Tue, Dec 4, 2012 at 1:03 PM, Richard Vézina
<[email protected]>wrote:

> Hello,
>
> I just check the trunk and don't see any improvement at the dropmenu
> script level.
>
> I appreciate the little script to allow the bootstrap menu to works as
> superfish use to work, but actually they are pretty not usable in
> production.
>
> I explained, it may be possible that the problem I face have be not notice
> by someone who not use the welcome layout or use it with the default
> bootstrap top nav bar color (black). But the hover of the main entry of the
> top navbar are not working properly and it can be appreciate when use
> navbar inverse bootstrap class. The hover sometimes stick other time
> disappear, etc.
>
> Also, when you quit the main entry to go in the submenu, sometime they
> just close baldly.
>
> I try to tweak the script, but I don't understand it pretty well. I will
> try again.
>
> Maybe the one that implement that could have look at it. I think it is
> Paolo, but I am not sure.
>
> Thanks.
>
> Richard
>
> On Tue, Dec 4, 2012 at 9:56 AM, Massimo Di Pierro <
> [email protected]> wrote:
>
>> he file is there but looks like it was not committed to git. Did you get
>> from github?
>>
>
>

-- 



Reply via email to