javascript - Manipulate widget loaded asynchronously -


i embedding widget html

   <div class="widget-hr-content">     <div class="widget-hr-header">      </div>     <div class="widget-hr-facts">         <img>     </div> </div> 

the script calls widget this

 <script async src="https://somewebsitesscript"></script> 

how use jquery manipulate anchor elements generated inside div class="widget-hr-facts" , know can use $('.widget-hr-facts').find('a').each use it, not understanding this. tried create new script tag add defer attribute it, didn't me.

<script async src="https://somewebsitesscript"></script> <script async> $('.widget-hr-facts').find('a').each(function(){ $(this).attr("href","redirectsomewherediffthanwidget");});  <script> 

but jquery failing out uncaught referenceerror: $ not defined

it timing issue, script taking long load. needed update of rendered html links redirecting user. did using

window.settimeout(function()


Comments

Popular posts from this blog

SQL php on different pages to Insert (mysqli) -

How to combine associative arrays in bash? -

c++ - No viable overloaded operator for references a map -