I have a PhoneGap application use Openlayers to show local map. I use a popup to show information of location which appeared before by a marker. I append a link into this popup to redirect to another page, but i get a error "Uncaught ReferenceError: $ is not defined" when click popup to redirect. New pages still show but don't have any js library or css are loaded, so generating error "Uncaught ReferenceError: $ is not defined". I think all js libraries are no longer in the DOM when redirect from popup. I use Ajax to load other pages and add it to DOM, so I reference all js libraries in a first page is index.html. I redirect successful with other redirections in my application.
Based on your code and our conversation, links generated outside JQM, won't be recognized by it. Thus, it essential to link jQuery and jQuery Mobile to the new link.
In your code, a link was generated by OpenLayer and not by JQM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With