SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Aug 25, 2008, 19:43 #1
- Join Date
- Aug 2008
- Posts
- 13
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Conflicting Javascript Files (import libraries)
Hi All,
I am working on an osCommerce site and am in the process of customizing the product page. I added a contribution for image overlay (lightbox2) and now want to add a social bookmarking button (OSC Socializer).
The problem is that the image overlay package uses "scriptaculous" while the social bookmarking button uses "mootools". Evidently there is some overlapping here as the image button does not work while the scriptaculous import statements are in the html head section. If I comment scriptaculous statements out, the social bookmarking button works fine.
Here are my import statements.
HTML Code:<script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"></script> <script language="javascript" type="text/ecmascript" src="social/js/mootools-1.2-core.js"></script> <script language="javascript" type="text/ecmascript" src="social/js/socializer.js"></script> <link href="social/css/socializer.css" rel="stylesheet" type="text/css" />
Any ideas about a viable approach?
Thanks!
-
Aug 26, 2008, 01:44 #2
- Join Date
- Oct 2004
- Location
- Birtley, UK
- Posts
- 2,439
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Take a look at: http://ajaxian.com/archives/getitnex...s-can-co-exist
-
Aug 26, 2008, 08:56 #3
- Join Date
- Aug 2008
- Posts
- 13
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi and thanks for your response.
The solution you reference is specific to jQuery's noConflict() method. The problem is that mootools and scriptaculous do not support this method.
I was wondering if there was anyway to isolate particular pieces of the webpage to use a specific library.
Any suggestions are appreciated.
Thanks ...
-
Aug 26, 2008, 10:47 #4
- Join Date
- Aug 2008
- Posts
- 13
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
After further investigation, it does not appear that there is a way around this. jQuery's noConflict feature seems great, but I don't think that there is a way to make "scriptaculous" and "mootools" play nice.
Decided to go with lightbox clone slimbox.
Bookmarks