46
rated 0 times
[
49]
[
3]
/ answers: 1 / hits: 24428
/ 11 Years ago, sun, october 20, 2013, 12:00:00
Hopefully it will be a quick and easy question,
I am creating a simple function, but need to trigger it about 3-4 seconds after the page is loaded, just do not know how.
Here is my script
$(function () {
var slideout = $('#slideout');
slideout.animate({
right: '-200px'
}, 1000, function () {});
$(.out).toggle(function () {
$(this).addClass('in');
slideout.animate({
right: '0px'
}, {
queue: false,
duration: 500
});
}, function () {
$(this).removeClass('in');
slideout.animate({
right: '-200px'
}, {
queue: false,
duration: 500
});
});
$(.close).click(function () {
$(this).removeClass('out');
slideout.animate({
right: '-200px'
}, {
queue: false,
duration: 1000
});
slideout.fadeOut({
duration: 1000
});
});
});
Any help is highly appreciated.
More From » jquery