jquery - How to add javascript functions to divs loaded externally? -
i have page , pageb. page loads page b div. there divs in page b when want execute functions onclick. problem no matter place pageb's javascript doesn't work.
i assumed if had function ot initalise pagesb's javascript after loaded div work... no success...
any responses helpful... regards j
if you're loading page b ajax, javascript inside page b getting stripped out. due security concern.
an alternative way work separate structure this
- page html
- page javascript
- page b html
- page b javascript
now, when load page should load following:
- page html
- page javascript
- page b javascript
then, when make ajax call load page b html, call page b javascript (which loaded) , should work.
here's example of i'm describing:
Comments
Post a Comment