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

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

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -