JSFiddle - React, Tailwind, and code Playground
by devcurry_com
HTML
<p>List of Links:</p>
<div>
<a href="http://jquery.com">www.jquery.com</a><br />
<a href="http://www.devcurry.com/">www.devcurry.com</a><br />
<a href="http://www.dotnetcurry.com">www.dotnetcurry.com</a><br />
<a href="mailto:[email protected]">[email protected]</a>
</div>
<input id="btnFindMailTo" type="button" value="Find mailto: links" />
<br/><br/>
Demo by <a href="http://www.devcurry.com/search/label/jQuery">DevCurry.com</a>
CSS
div { height: 100px; width: 250px; border: 1px solid black; }
JavaScript
$(function () {
$.extend($.expr[':'], {
mailToLink: function (obj) {
return obj.href.match(/^mailto\:/);
}
});
$("#btnFindMailTo").click(function () {
$("div a:mailToLink").css("color", "red");
});
});