I am currently working on a simple output for a script based website that I found somewhere on SO. Now I want to add a background overlay to an existing function, but I donβt know how and where I should call it.
Here is a pull script.
http://jsfiddle.net/hr9bymj1/
and this is a function
$(function () { $("#clickme").click(function () { if ($(this).parent().hasClass("popped")) { $(this).parent().animate({ left: '-400px' }, { queue: false, duration: 500 }).removeClass("popped"); } else { $(this).parent().animate({ left: "0px" }, { queue: false, duration: 500 }).addClass("popped"); } }); });
I tried some methods found on the Internet, but I cannot combine the click event corerectly with the addition of a div, so I am stuck and try to help here.
Thanks!
source share