jquery - Retrieve display property using javascript -
<style type="text/css"> { display: none; } </style> <p id="p"> paragraph </p> <a href="google.com"; id="a">google</a> <script type="text/javascript"> var = (document.getelementbyid('a')).style; alert(a.display); var p = (document.getelementbyid('p')).style; alert(p.display); p.display = 'none'; alert(p.display); </script>
how retrieve display property of anchor tag correctly? thanks.
use .css()
var value = $(element).css('display')
Comments
Post a Comment