$(document).ready(function() {
var move = "expand";
$('div').click(function(){
if (move == "expand"){
$('div').animate({width:"30px",height:"30px"},500);
move = "shrink";
} else {
$('div').animate({width:"80px",height:"80px"},500);
move = "expand";
}
});
});
Live Demo
Labels
- bootstrap (1)
- css (4)
- jquery (16)
- Live Demo (14)
- Others (2)
- PHP (4)
- prestashop 1.6 (7)
- Topic - Advance (7)
- Topic - basic (27)
- Topic - Semi Advance (16)
- wordpress (6)
- wordpress plugins (1)
- YII (14)
Wednesday, October 8, 2014
Expand and shrink animate on click jquery
This short jquery script makes an element shrink or expand on click. Simple logic is added to make the script toggle on click.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment