vkaravir/js-parsons — pull request #2 by hewner (2012-11-12 19:57:13+00:00)
Title: Changes to allow noConflict and multiple parsons per page

So there are two changes here -

1. I changed lis.js and parsons.js both to save off the $ and _ variables. This lets them be safely reverted with noConflict. I tried to do it in the way vkaravir suggested.

2. I need multiple parsons problems per page. The code mostly worked as expected without modification, but the color feedback did not. Also, multiple parson problems per page caused duplicate id elements, which isn't a good thing.

My solution was to change the ID_PREFIX global to be local to each parson widget (it's set based on the id of the source div). I'm not sure if that's the Right Way to do it...suggestions welcome.

One thing I did not not test is the code that hashes/unhashes versions of the problems. Wasn't quite sure how to test it properly. So that should be looked at before this gets pulled.