I am having a huge issue with an item in the navbar not being able to use the click()
this is my html code:
<li class="dropdown"> <a class="dropdown-toggle" id="n-btn" href="#" data-toggle="dropdown"> <i class="icon-bullhorn"></i> <span class="badge badge-inverse" id="n-count" style="position: relative; bottom: 2px;">1</span> </a>
<div class="dropdown-menu alert-dropdown">
<ul>
<li class="text-center"><span class="pulser"></span></li>
</ul>
</div>
</li>
and my javascript:
$(window).load(function(){
$("#n-btn").click(function(e) {
e.preventDefault();
alert("test");
});
});
I tried using $(".dropdown").on("click", "#n-btn",function() { instead but it still doesn't work. If this changes anything I'm using jquery 2.0.0 and Bootstrap 2.3.2
DOM Readyinstead of load.. How abt the browser you are trying on ?