Reputation: 122
This code is supposed to wait until the user clicks on something other than div id="s" and then returns to its place but it keeps triggering immediately when I click. I want it to stay open!
Here is the code and jsfiddle: http://jsfiddle.net/hBb9L/
$("#e").click(function() {
//done
$("#re").animate({
"margin-top": "104px"
}, 800);
$("#ret").animate({
"margin-top": "104px"
}, 800);
$(".popu").animate({
"margin-top": "-102px"
}, 800);
$("#s").show(200);
$("div:not(#s)").click(function() {
$("#re").animate({
"margin-top": "0px"
}, 800);
$("#ret").animate({
"margin-top": "0px"
}, 800);
$(".popu").animate({
"margin-top": "0px"
}, 800);
$("#s").hide(200);
});
});
Upvotes: 0
Views: 50