this - How do I animate a element when clicking a button with jQuery? -


i learning jquery , trying workout how add class span when clicks inside 1 text input field in form, , doesn't apply class of spans when 1 of inputs clicked.

at moment have code, add class, when click inside 1 of text input fields adds .active class of inputs.

$(".form input").click(function(){   $("span").addclass("active"); }); 

i understand have use $(this), can't quite figure out syntax isn't clicking yet.

thanks help

edit

sorry should have included more of code. have added link website trying achieve. when click on 1 of inputs in form label input moves can enter text. have noticed if don't enter label moves down again.

website: website link

thanks replies far

currently learning jquery , trying workout how add class input when button clicked

$(".form input[type=button]").click(function(){   $(this).addclass("active"); }); 

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -