Friday, 15 August 2014

jquery - set attribute using javascript -



jquery - set attribute using javascript -

i want set display none of anchor tag using javascript.

i'm using below javascript

<script type="text/javascript"> $(document).ready(function () { settimeout(function () { $("#switchtoreadingmode-small14").style.display = 'none'; }, 1000); }); </script>

but gives me error uncaught typeerror: cannot set property 'display' of undefined.

please note that: anchor tag not in form. i'm finding tag , id pressing f12 button (inspect element). i'm using 1 embeded code url. on url anchor tag exist

$("#switchtoreadingmode-small14") returns jquery object not have style property. instead can utilize .hide() method provided jquery hide element

$(document).ready(function () { settimeout(function () { $("#switchtoreadingmode-small14").hide(); }, 1000); });

javascript jquery asp.net

No comments:

Post a Comment