I am keeping a bootstrap drop down open when the user clicks the content of the dropdown, otherwise it should be hidden ( e.g. on outside click and when the button is pressed again)
This is working in this example:
http://jsfiddle.net/sK56j/
$(function () {
$('.dropdown > ul').on({
"click": function() {
return false;
}
});
});
However, I am adding an ajax link (asp.net mvc) into the dropdown, when clicked the ajax event is being blocked.
How can I achieve the above without blocking all javascript events?
Here's a quick paint masterpiece for what I am trying to achieve:
https://i.stack.imgur.com/tRUCO.jpg
Thanks
EDIT:
AJAX Link Code
@Ajax.ActionLink("X",
"Action", "Controller",
new { <route values> }, new AjaxOptions {
HttpMethod = "POST",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "element-id" },
new { <html attributes> })
http:// msdn.microsoft.com/en-us/library/system.web.mvc.ajax.ajaxextensions.actionlink(v=vs.118).aspx