How do I get the href attribute of a hidden element e.g.
<div style="display: none;">
<div id="inline1" style="width:640px; height: 363px; overflow:hidden;">
<a class="a.player" style="display: block; width: 640px; height: 360px; " href="http://myvideo.mp4"></a>
</div>
</div>
var videolink = $('a.player').attr('href');
alert (videolink);
This will give an undefined value, any help would be great.
Your class name is flawed.
You should just name it player and then select it with a.player.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With