In jQuery coding we are used to get elements by id or class name.

jQuery("#element_id")....

jQuery(".element_class_name")....

But it is also possible to get elements by any attribute name.

For example lets get element which name is ‘element_name’

jQuery('[name="s"]')....

Or by any custom non-standard attribute.

jQuery('[data-image="any_image_src"]')....

Subscribe us and don't miss new articles in your chosen category:

Follow us in Feedly for to get better tips and tricks in time: follow us in feedly

Share this article in social media:

Posted in Web dev.Tagged .

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required