Preventing Multiples [closed]
I'm trying to figure out how I can prevent multiple of the class asks questions at the same time or the ask2 question currently displaying with the ask question.
http://pastebin.com/S91NfZVV
Add this at line 26, right after e.preventDefault();
if($('div.question').length){return;}
This instead will close an existing box before opening another one(has to be placed at the same line)
$('div.question').fadeOut(function(){$(this).remove();});
精彩评论