Bootstrap 3 dropdowns do not fire

I am trying to show a featured event released on this site running on BS3.0

http://hmelius.com/avant/index.php

I tried this code in the console (from the BS3 documentation page) but no luck

$('.dropdown-toggle').on('shown.bs.dropdown', function () { console.log("shown"); }); 
+7
javascript twitter-bootstrap twitter-bootstrap-3
source share
2 answers

I believe that the events light up with a β€œparent” and not a switch, so this will be the element above the switch with .dropdown or .btn-group ; drop-down wrapping element

take a look at the source to understand what I mean: https://github.com/twbs/bootstrap/blob/master/js/dropdown.js

+23
source share

Based on @ monastic-panic comment, this works

 $(".dropdown-toggle").parent().on('show.bs.dropdown', function () { console.log("shown"); }); 
+1
source share

All Articles