Using jQuery in MicroStrategy Dashboards
Load the library via an HTML Container
You can simply include the code to import jQuery right into the HTML Container you’re going to call it from. The script to do this is:
The advantage to using this method is that it requires zero plugins. Also, the library can be large (you can also try the .min. version if you experience loading problems on older machines), so choosing to only load it on Documents that specifically need it can be a good choice.
Load the library via a plugin
You can modify the mstrWeb.aspx and Mojo_Section.aspx (for Express mode) pages and simply add the <script> tag after the <head> tag, and now it’ll be globally loaded.
The advantage here is a slightly cleaner looking HTML Container that makes debugging a little easier, as well as no need to remember or store that command. Also, if you need to upgrade the version you’re using, then having a single reference makes that easier.
Referencing the .js file
My examples show a direct cross site link. Doing this could potentially add some delay or outage if the jQuery site is having trouble. Due to the nature that they roll these out, there isn’t any source control advantage to do it this way (meaning, any updates will be delivered in the form of new versions, not updated in line). As such, the best approach is probably to download a copy of the script to your server and reference it locally, like this:
This does require a few extra setup steps that you may or may not have access to, but you can try it out using the direct link (if your web server allows cross site scripting) before going through the trouble of moving files around.
What can you do with jQuery?
List of all of my jQuery Hacks