I am jQuery beginner 🙂 I am trying to move from left to right but all I did is moving to the right. How to move it back?
$(function () {
$('#box').click(function () {
$(this).animate({
"left" : "300px"
}, 4000);
});
});
Also I have update panel on my page with left right button that do some things in code behind. How to call this left/right function from code behind?
To move it back to the left you just append another animate:
This is an anonymous function as event handler you can’t call, it will only run on the click events on the div. You could move it outside
and then maybe this will help.
EDIT:
I found an article describing how you can call javascript from the code-behind.
Hope it helps