jquery - .click .animate .toggle combining two things into one button -
i'd appreciate advice.
i'd combine 2 functions on 1 button.
i've written makes button move or down when clicked. i'd use button toggle text appear. have javascript both done don't know how combine black circle 1 button.
i put code on jsbin please take look!
http://jsbin.com/avuruz/235/edit
also
don't know why black circle goes crazy @ start.
circle should go first down , forth. first 2 clicks goes up, up.
$(function(){ var c=0; $(".click").click(function(){ $(this).stop().animate({top: ++c%2*100 }, 'fast'); });
});
thanks
simply bind both function .click
Comments
Post a Comment