What’s the preferred way of referencing a jQuery library on pages that use https? We have a checkout masterpage that needs to make use of jQuery UI widget but I keep getting an error:
Uncaught TypeError: Object #<Object> has no method 'dialog'
When calling the jQuery dialog. I’ve looked in chrome tools and the page is trying to get the library over https but it’s location is defined as http in my markup. So what I’m asking is, how can i reference these libraries on secured pages? Do i reference a local copy within the site itself rather than a CDN? Or is there a https version that i can use?
Thanks
Google and Microsoft CDNs serve jQuery and jQuery UI through HTTPS as well. Just switch the protocol. E.g.:
https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
You can also just omit the protocol when referencing the external library:
This way the script will be loaded using the same protocol as its document.