Reputation: 4906
I am new to jQuery. I have learned functions like SlideUp and Down but I can't find anything like Slide Left and Right.
I want to make a content slide with horizontal sliding effects. I have achieved vertical sliding in it. I dont want to use an existing plugin or library. I want to build my own.
Please guide me !
Upvotes: 0
Views: 13294
Reputation: 11028
Here is a great tutorial to slide elements in different directions.
Upvotes: 2
Reputation: 29170
Here is an example using animate()
. This can easily be adpoted to be a jQuery function rather than JS functions
$('#slidein').click(function(){
$('div').stop().animate({
'width':'500px'
}, 500);
});
$('#slideout').click(function(){
$('div').stop().animate({
'width':'0px'
}, 500);
});
Upvotes: 2
Reputation: 1645
Maybe JCycle can be suitable for you. It supports a lot of changing slide such as up, down, left, right, fade in/out, ....
You can download and view demo at this website : http://jquery.malsup.com/cycle/
Upvotes: 1