I am looking for some ideas on how I can remove an entire plugin from the DOM. Unfortunately the plugin creator did not leave an easy way for me to remove all the events and elements. I really would like to use the plugin but when I load a new page (via AJAX) I need to destroy the pageGuide.js events and DOM created elements.
Here is the link to the plugin’s page:
http://tracelytics.github.com/pageguide/
Any help/ideas would be GREATLY appreciated!
thanks!
I ended up solving this if someone else ever wants to use this in an AJAX web app.
First you need to search the pageguide.js and change all the “.live” to “.bind”
Next find this line of code:
ns.setAttribute("type", "text/css");Next add this line under it:
ns.setAttribute("class", "pageGuideStyle");Finally add this to your code before you call the “init” function:
You will need to call this code before all pages load. I ended up making a global variable and calling it in the load function.
thanks,
Mitch