Offer a version of userfly.js without jQuery
Many websites already use jQuery. userfly forces those websites to have two, sometimes identical or possibly conflicting, copies of jQuery being loaded.
Another option would be to check to see if jQuery and the correct version exists before including it... or predefining, or allowing the user to define, the namespace userfly's copy of jQuery will be loaded into.
For new accounts, userfly.js will no longer conflict with jQuery since we’re now using our own protected javascript namespace. For current customers, shoot an email to support@userfly.com and we’ll make the change. :)
We’ve also implemented a userfly.js hint so that jQuery doesn’t get loaded again if you’ve already included it. Specify your jQuery symbol via a GET parameter, jQuery, but ensure that your jQuery library (>= 1.3.2) is loaded prior to including userfly.js. :)
For example, you can now pass the following jQuery hint:
document.write(unescape(“%3Cscript src=’” + userflyHost + “/users/x/userfly.js?jQuery=$’ type=‘text/javascript’%3E%3C/script%3E”));
Or if you’re running jQuery in non-conflict mode:
document.write(unescape(“%3Cscript src=’” + userflyHost + “/users/x/userfly.js?jQuery=jQuery’ type=‘text/javascript’%3E%3C/script%3E”));
1 comment
-
stephen.johnston
commented
A version using prototype would be good as well. We use prototype and I have some concerns about running this alongside prototype.