Reputation: 407
I have a quick question about jquery's toggle speed that I cannot implement in this particular case:
My question:
How could I implement in my code something that would make the second click also go slower and not so abruptly?
$(document).ready(function() {
$('#side').hide()
}),
$("#btn").click(function() {
$('#main').toggleClass('two-thirds');
$("#side").toggle(1000);
});
Upvotes: 0
Views: 52
Reputation: 2162
You could use .animate() or CSS3 Transitions, depending on your client base.
Jquery .animate() http://api.jquery.com/animate/
CSS3 Transitions: http://www.w3schools.com/css/css3_transitions.asp
Upvotes: 1