i want to get an element by it href attribute in jquery or javascript, is that posible??
thanks!
i want to get an element by it href attribute in jquery or javascript, is that posible??
thanks!
Yes, you can use jQuery's attribute selector for that.
var linksToGoogle = $('a[href="http://google.com"]');
Alternatively, if your interest is rather links starting with a certain URL, use the attribute-starts-with selector:
var allLinksToGoogle = $('a[href^="http://google.com"]');