Find a anchor tag inside a div using Jquery using Href attribute or Innerhtml
By TSN ...
As we know the atg line of Jquery Is Write Less Do More, and it does the reflect the same with it ultimate by using little code we can perform the same task which previously we used to write with more lines.
jQuery(document).ready(function () {
jQuery("div a[innerHTML*='No back link']").parent().hide(); // works fine in IE but nt in firefox
jQuery("div a[href*='http://apycom.com']").parent()[0].style.visibility = 'hidden'; //Works for Both IE and Firefox
});
and the html code is some thing like this....
<div style="z-index: 9999; visibility: hidden; display: block; padding: 3px; font: bold
11px Arial; background-color: rgb(149, 209, 61); position: absolute; top: 10px;
left: 10px;">
<a href="http://apycom.com/" style="color:#000;">No back link</a>
</div>
Find a anchor tag inside a div using Jquery using Href attribute or Innerhtml (1227 Views)