Use jquery ':contains' to find specific javascript within a span -
this first time here, hope clear.
so have code similar this.
<span class="mediasource ui-draggable" id="purchseplay7915504"> <a href="" onclick="return popup_window(this, 'mediaview', 850, 680)" class="control" enter code hereid="genericlink"></a> <img id="any_71" alt="media source" src="images/9672web.gif" class="mediastationicons mediawin"/> <img class="player" alt="media source" src="images/playmedia.gif" style="display: none;"/> </span>
the href portion generated on backend, , have no access it.
i need modify existing jquery code based on 'onclick' function is(there different ones e.g. popup_window1,popup_window2 etc.) .
i tried this:
$('.segmentleft span.mediasource').click(function(){ if ($('span:contains("popup_window")').length > 0) { } });
but not seem work.
try $('span > a[onclick*="popup_window"]');
Comments
Post a Comment