I created two scripts, one of which has a slide up and slide down commands that work with timers when the page loads. The second is a click event when the slide show / down command is executed when a link is clicked. Both of these scenarios work separately, but I cannot get them to work together.
Below is the slide time / down script:
$(document).ready(function() { $('.slide-out-div').hide(); $('.slide-out-div') .delay(5000) .slideDown(300); $('.slide-out-div') .delay(5000) .slideUp(500); });
Here is the script click:
window.onload = function() { $(document).('#clickme').click(function () { if ($('.slide-out-div').is(":hidden")) { $('.slide-out-div').slideDown("slow"); } else { $('.slide-out-div').slideUp("slow"); } }); };
How it should work, when the page loads, the window moves down after a few seconds, and then, if the field is not used, it will move after a few seconds. At this point, the link can be clicked to make the window slide up or down depending on its current position.
Any help allowing them to work in combination is greatly appreciated :)
source share