javascript - Remove dynamically inserted code -


i discovered following code in page source. hand of plugin using. tried remove jquery did not work. can give me suggestions how should go removing it? tried select unique selector + .remove() did not work.

<div style="position: absolute; top: -136px; overflow: auto; width: 1241px;">     <h3>         <strong>             <a href="http://shopgiaynu.vn" style="font-size: 11.335pt;">shop giày nữ</a>         </strong>         <strong>             <a href="http://thoitrangf5.vn" style="font-size: 11.335pt;">thời trang f5</a>         </strong>         <strong>             <a href="http://themestotal.com/tag/responsive-wordpress-theme" style="font-size: 11.335pt;">responsive wordpress theme</a>         </strong>         <em>             <a href="http://2xaynha.com/tag/nha-cap-4-nong-thon" style="font-size: 10.335pt;">nha cap 4 nong thon</a>         </em>         <em>             <a href="http://2giaynu.com/giay-nu/giay-cao-got-giay-nu" style="font-size: 10.335pt;">giay cao got</a>         </em>         <em>             <a href="http://2giaynu.com" style="font-size: 10.335pt;">giay nu 2015</a>         </em>         <em>             <a href="http://2xaynha.com/tag/mau-biet-thu-dep">mau biet thu dep</a>         </em>         <em>             <a href="http://fsfamily.vn/lam-dep/toc-dep">toc dep</a>         </em>         <em>             <a href="http://ihousebeautiful.com/">house beautiful</a>         </em>         <em>             <a href="http://2giaynu.com/giay-nu/giay-the-thao" style="font-size: 10.335pt;">giay thao nu</a>         </em>         <em>             <a href="http://2giaynu.com/giay-nu/giay-luoi-2" style="font-size: 10.335pt;">giay luoi nu</a>         </em>         <em>             <a href="http://phunuz.com" style="font-size: 10.335pt;">tạp chí phụ nữ</a>         </em>         <strong>             <a href="http://hardwareresourcesnew.com/">hardware resources</a>         </strong>         <strong>             <a href="http://shopgiayluoi.com/">shop giày lười</a>         </strong>         <strong>             <a href="http://www.thoitrangnamhanquoc.vn/">thời trang nam hàn quốc</a>         </strong>         <strong>             <a href="hhttp://giayhanquoc.com/">giày hàn quốc</a>         </strong>         <strong>             <a href="http://giaynam.pro/">giày nam 2015</a>         </strong>         <strong>             <a href="http://shopgiayonline.com/">shop giày online</a>         </strong>         <strong>             <a href="http://aosomihanquoc.vn/">áo sơ mi hàn quốc</a>         </strong>         <strong>             <a href="http://f5fashion.vn/">f5 fashion</a>         </strong>         <strong>             <a href="http://thoitrangf5.vn/">shop thời trang nam nữ</a>         </strong>         <strong>             <a href="http://diendannguoitieudung.com/">diễn đàn người tiêu dùng</a>         </strong>         <strong>             <a href="http://diendanthoitrang.edu.vn/">diễn đàn thời trang</a>         </strong>         <strong>             <a href="http://giaythethaonuhcm/">giày thể thao nữ hcm             </a>         </strong>     </h3> </div> 

you can use href attribute selector if url same , unique on page.

make sure execute script after html loaded dom

check anchor tag , remove closet div.

$('a[href="http://shopgiaynu.vn"]').closest('div').remove(); 

demo


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -