Am using jquery to show a div on click and to hide it when you click anywhere else! But the problem is, the script also hides the div when you right click INSIDE the div.
here is my jquery;
$(function() {
$(".activities a").click(function(e) {
$('.search').html('<center><img src="loading.gif" style="margin: 20px 0;" /></center>');
$(".search").toggle().toggleClass("active");
$('.search').load('someurlhere.php');
e.stopPropagation();
});
$(document).click(function(e) {
$('.active').hide().removeClass('active');
});
$(".search").click(function(e) {
e.stopPropagation();
});
});
I would try:
Demo: http://jsfiddle.net/karim79/8bUgc/