Well, what i want to do is having a lightbox and a sliding top panel. Both use mootools and both seem to use different versions.

It does not work if comment out one of these although they are booth the actual mootools library.

<!a possible js config. either these two are commentented out, or the mootols.svn.js
<!-- libraries/frameworks for milkbox-->
<!--script type="text/javascript" src="js/mootools-1.2.3-core-yc.js"></script>
<script type="text/javascript" src="js/mootools-"></script-->
<!-- mootools for the sliding top panel. should work also with the one imported above, so i was going to deactivate the one below-->
<script type="text/javascript" src="js/mootools.svn.js"></script> 
<script type="text/javascript" src="js/milkbox.js"></script>
<script type="text/javascript" src="js/panel.js"></script>

So no matter which one (*-1.2.3-core-yc and -more.js or mootools.js) I comment out, always one of the features doesnt work.

While it actually should be possible as both are mootools. Does someone have a solution for this? (I have heard about the term namespace and know roughly what it means, but i dont know how to use it)

Thanks a lot in advance,


2 answers

danwellman 5600
This was chosen as the best answer

If the different versions of mootools are conflicting, there will probably not be a lot that you can do to make the two plugins work together short of hacking/editing one of them.

The milkbox one says it works with mootools 1.2.x which indicates it is compatible with all 1.2 variations. The other one does not specify (clearly on the page) which version is required, but it seems very small and the tutorial indicates that it's very easy to use.

I would use the version of mootools required for milkbox and then work at getting the sliding panel one working with the same version as milkbox.

When you comment out the version for the sliding panel, do you get JavaScript errors? Or does the sliding panel just not work?

According to this page you cannot use 2 versions of mootools on the same page.

Personally I would look for a new sliding panel plugin that is compatible with the version of the library used by milkbox, this search lists quite a few :)

Answered about 10 years ago by danwellman

Can't help you on this specifically about mootools as I haven't used it but I had the same problem with jQuery versions attempting the exact same thing this morning. Was ripping my hair out and then eventually got it working with fancybox and coda-slider.

I know this isn't the solution you're looking for but if you get desperate..

<script src="js/jquery-1.2.3.pack.js" type="text/javascript"></script>
<script src="js/jquery-easing.1.2.pack.js" type="text/javascript"></script>
<script src="js/jquery-easing-compatibility.1.2.pack.js" type="text/javascript"></script>

<script src="js/jquery.fancybox-1.0.0.js"type="text/javascript"></script>
<script type="text/javascript">
                $(document).ready(function() {

<script src="js/coda-slider.1.1.1.pack.js"type="text/javascript"></script>
<script type="text/javascript">
                jQuery(window).bind("load", function() {
                        // jQuery("div#slider2").codaSlider()
                        // etc, etc. Beware of cross-linking difficulties if using multiplesliders on one page.
Answered about 10 years ago by JumboJambo