Target elements with specific attributes


/ Published in: jQuery
Save to your folder(s)

Easily target elements which have certain attributes using jQuery


Copy this code and paste it in your HTML
  1. $('a[target=_blank]').css('background', 'red');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.