javascript setinterval
setInterval(function(){
console.log("Oooo Yeaaa!");
}, 2000);//run this thang every 2 seconds
javascript setinterval
setInterval(function(){
console.log("Oooo Yeaaa!");
}, 2000);//run this thang every 2 seconds
slide right jquery
$('#hello').hide('slide', {direction: 'left'}, 1000); requires the jQuery-ui library. See http://www.jqueryui.com
js setinterval
function func(){
console.log("Ran")
}
setInterval(func,1000)//Runs the "func" function every second
jquery slide left right animation
This should work:
$('#menu').click(function(event) {
event.preventDefault(); // because it is an anchor element
$('.whole').animate({
right: '200px'
});
$('#slideMenu').toggle();
});
But your position property should already be set in CSS or you might not get exactly what you need.
Working JSFiddle
To explain: the function takes a JS object of properties, like this:
{
right: '200px',
somethingElse: 'value',
myboolean: true
}
you can also assign this to a var and pass it to animate:
var cssProperties = { right: '200px' }
$('#menu').click(function() {
$('.whole').animate(cssProperties);
});
You can pass other arguements as readable in the documentation.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us