I’ve been trying to change the speed of the toggle effect. I have checked the documentation, but I can’t seem to find out what I’m doing wrong.
I have tried using numbers (ie 3000, 300) and text (ie slow, fast) but I don’t see any difference. I’m using jQuery 1.7.2 and jQuery-UI 1.8.18.
This is my javascript code:
$(document).ready(function() {
$('button').click (function () {
$('.myDiv'). toggle ("bind", "", 3000);
});
});
My HTML:
<div class="myDiv" style="width: 400px; height: 400px; background-color: blue;"> </div>
<button>Toggle</button>
Can anyone help me to find out what I’m doing wrong?
Thanks
Duration comes as first parameter of
.toggle()not as the third one..toggle( [duration] [, easing] [, callback] )