javascript - get elements by class which is contained in form with id -


i have lot of forms on page , need differentiate them validation. have form id , fields need validated have validate class, need select elements specific form class validate, tried

$("#service_partners.validate") 

but result empty array

#service_partners.validate selects elements have class validate , id service_partners. selector you're looking #service_partners .validate.

the space says "all elements class validate contained within element id of service_partners."

for more explanation on how selectors these work, check out the mdn article on css-style selectors


Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -