Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bootstrap 2.0 bootstrap-dropdown.js errors out when i add it to my js plugin lists

this is my current javascript includes

<%= javascript_include_tag 'jquery','application'  %>

its works fine but the moment i add the bootstrap-dropdown plugin.

<%= javascript_include_tag 'jquery','bootstrap-transition','bootstrap-dropdown','application'%>

i get an error (firebug console) thats from the bootstrap-dropdown file.

--$("html").on is not a function
[Break On This Error]   
$('html').on('click.dropdown.data-api', clearMenus)-- 

not too sure what I'm doing wrong here or what i did not catch/get. oh btw the old bootstrap-dropdown worked for me.

like image 304
gekong Avatar asked Feb 04 '12 14:02

gekong


People also ask

Why is dropdown not working in Bootstrap?

Why is my drop down menu not working in bootstrap? Solution : The dropdown should be toggled via data attributes or using javascript. In the above program, we have forgotten to add a data attribute so the dropdown is not working. So add data-bs-toggle="dropdown" to toggle the dropdown.

How do I add a dropdown list in Bootstrap?

Basic Dropdown To open the dropdown menu, use a button or a link with a class of . dropdown-toggle and the data-toggle="dropdown" attribute. Add the . dropdown-menu class to a <div> element to actually build the dropdown menu.

Can you use JavaScript and Bootstrap together?

All Bootstrap's JavaScript files depend on util. js and it has to be included alongside the other JavaScript files. If you're using the compiled (or minified) bootstrap. js , there is no need to include this—it's already there.

How do I stop Bootstrap dropdown from closing?

This behavior can be changed by using the autoClose property. By default, autoClose is set to the default value true and behaves like expected. By choosing false, the dropdown menu can only be toggled by clicking on the dropdown button.


1 Answers

You need to upgrade to jQuery 1.7.1.

like image 102
Z. Young Avatar answered Sep 29 '22 06:09

Z. Young