Search code examples
javascriptjquerydrop-down-menutwitter-bootstrapstoppropagation

Twitter Bootstrap Dropdown with Tags Selector


I have a question with Twitter Bootstrap, I'm using the Dropdown plugin and I'm trying to create a tag selector, I created an example in this link:

http://jsfiddle.net/gatnc/

I've tried this:

event.stopPropagation;
return false;

Does anyone have a better solution that does not close the dropdown when selecting a tag?

Note: Click on "New Tag".

Thanks!


Solution

  • This works:

    $('.dropdown-menu').on('click', 'li', function(event){...});
    

    Updated jsFiddle