Here’s a bookmarklet that allows me to debug any webpage using jQuery via the Chrome Developer Console:
To install, simply just drag the above link onto your bookmarks/favourites bar.
Note: This bookmarklet will first prompt whether you want to overwrite any current version of jQuery that is already loaded on the page with the latest minified version of jQuery.
I was trying to use the jQuery load function in Chrome (on Windows) when I encountered the following error:
XMLHttpRequest cannot load file:///C:/Projects/test/about.html. Origin null is not allowed by Access-Control-Allow-Origin.
I discovered that I had to disable web security in chrome by closing ALL currently running instances of chrome and then running chrome with the – -disable-web-security parameter:
Chrome would then display the following warning header once it was loaded:
Note: I would only recommend this option for development purposes. Please do not use this option for every day browsing.