$(document).bind("click",function(e){ var target = $(e.target); if(target.closest("#regionlist,#selectRegion").length == 0){ $("#regionlist").hide(); } })