function - Why can't i make toggle effects. and jquery doesn't register a class change -
i have been trying create toggle alot of things in jquery now, still new jquery. have tried toggleing class, copying off of other scripts. , normal toggle function.
$(function(){ $('div').toggle(function(){ $(this).text('odd clicks'); }, function(){ $(this).text('even clicks'); }); });
https://www.jsfiddle.net/bvr2r/84
here example. can explain me why selected content gets fade out?
also here illustration of thought class swap:
http://www.jsfiddle.net/bvr2r/85
i know not perfect, made in rush, point still stands. knows why 1 of don't work? or have thought create work? have tried alot of different threads , cant seem toggle effect.
last example. tried create next button, changing class when click. firebug shows class gets changed, seems jquery doesn't realize new class existant. same problem different example
switching version of jquery pre-1.9 create work.
it documented rest of upgrade guide @ http://jquery.com/upgrade-guide/1.9/#toggle-function-function-removed
jquery function events toggle
No comments:
Post a Comment