dynamic jquery loading, why script is executed 2 times?
I am making a widget to work on any site, that means not my site, so I have no control of what other libraries are used on the page.
Thats why I am loading my own jQuery libraries dynamically and then execute my own code.
An issue I have that some sites are loading fine and all is working as expected, but some sites are executing the code 2 times.
I have made a page dump and put on my own server, so I can replicate the issue better.
GOOD: here is a page that works OK: (see the button that says: send these contact details and map to your mobile.)
BAD: here is the page that shows the button I am trying to load 2 times:
As you can see the button appears 2 times, which is wrong...
Even it shows 2 times, the popup appears just ok when you click on the button.
Would anyone be able to check what can be wrong here?
the code is in the:
so its easier to find.
Any help would be much appreciated.