I've got a popup that I don't want to close unless you click off of it, however it closes whenever I click on it as well. It shouldn't close when you click inside the div with the class of "create-album-container"
$(document).ready(function() {
////posts menu
$(".container").on("contextmenu", ".photos-bottom .albums li", function(e) {
var id = $(this).attr("id");
e.stopPropagation();
e.preventDefault;
$('.create-album-container').hide();
$('.photos-bottom .albums li#'+id+' .create-album-container').show();
return false;
});
$("body").click(function (event) {
$('.create-album-container').hide();
});
});
Should be
e.preventDefault();
- it is a functionAnd did you try to add
?