css - Fade input text jquery -


i'm trying create elegant reset feature on site such when user presses reset button, input boxes fade out user input text , fade in placeholder text, ready text re-entered.

$.each($('input.search-box'), function () {      var $input = $(this);      // fade out text - fades whole element.. don't want     $input.animate({ opacity: 0 }, 1000, function () {          // reset default value         $input.val("");          // fade text in         $input.animate({ opacity: 1 }, 1000)        });  }); 

the above shows trying achieve.. fades whole input out in. please tell me how achieve effect on text?

many thanks,

cam.

i thinking in animate value text color background input color jquery doesn't support color animations you'll need color plugin or, jquery ui. both allow use syntax you're using properties background-color , color.

like seen on here


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -