twitter bootstrap drop down suddenly not working

后端 未结 14 1264
半阙折子戏
半阙折子戏 2020-11-28 22:18

i was wondering if someone could help me. my bootstrap drop down menu suddenly stopped working. i have no idea why. it was working before. i didn\'t touch my views my layout

14条回答
  •  隐瞒了意图╮
    2020-11-28 23:17

    I found a alternative! all of these solutions didnt work for me. Instead of having the dropdown triggered on click, I had it trigger on hover instead. put on bottom of page in script tags. code from: http://codedecoder.wordpress.com/2013/10/21/bootstrap-drop-down-menu-not-working-rails/

    $(document).ready(function(){
        $('.navbar .dropdown').hover(function() {
            $(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown();
        }, function() {
            $(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp()
        });
    n})
    

提交回复
热议问题