Friday, 23 August 2013

Can't access DOM element with jQuery

Can't access DOM element with jQuery

Html:
<section id="playing" class="gradient">
<div id="playing-header"> … </div>
<div id="playing-carousel"> … </div>
<div id="playing-info">
<a id="radio-star" class="" href="radio:star"></a>
<div id="radio-track-info">
<h2 id="radio-track"> … </h2>
<h2 id="radio-artist">
<a class="outgoing">
JAY Z
</a>
</h2>
</div>
<div id="thumb-container"> … </div>
</div>
<div id="loading" style="display: none;"></div>
<div id="loading-throbber" style="display: none;"></div>
<div id="station-error" style="visibility: hidden;"> … </div>
jQuery:
alert($('#radio-artist .outgoing').text());
jsfiddle: http://jsfiddle.net/CT95N/
Works on jsfiddle, but not on website. returns empty. what could be the
problem? what could i check to call my jquery after dom?
thanks

No comments:

Post a Comment