Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
25
rated 0 times [  30] [ 5]  / answers: 1 / hits: 18458  / 11 Years ago, wed, july 24, 2013, 12:00:00

I use jQuery .toggleClass() function, class will toggled per click, that works perfectly, but i can't setup speed, i have tried this:



$('#databox').toggleClass('boxopened', 7000);


also this:



$('#databox').toggleClass('boxopened', 'easeInQuad');


and also this: http://forum.jquery.com/topic/hover-and-toggleclass-fail-at-speed



I have add latest jquery 1.10 and jqueryUI: 1.10.3



It's possible to setup speed?


More From » jquery

 Answers
28

Ensure that you are including JQuery UI Effects - the base JQuery does not allow transitions on show/hide/toggle, it's added as an extension from UI Effects. (In your app, or in browser console, try running $.ui.version)



http://api.jqueryui.com/toggleClass/



EDIT:Works for me on $.ui.version => 1.10.3 (the version you requested). Here's a demo: http://jsfiddle.net/yKFjA/1/



What styling changes are being applied that you wish to see animated?


[#76775] Tuesday, July 23, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kinsley

Total Points: 352
Total Questions: 84
Total Answers: 94

Location: Denmark
Member since Tue, Jul 19, 2022
2 Years ago
;