DevelopPHP.com 2010 Discussion Archive(not active)

 

Forum Index >> JavaScript Forum

multiple scripts
   THREAD CLOSED
multiple scripts
by ricki - Thu Feb 03, 2011 11:22:16 AM
Hi !

i have i js script ( tab function ) with images, that works great. but when i try to add lightbox to it it either displays the tab function or the lightbox, but i whant them both working together. what can i do. i can see that the problem is the possition of the activation scripts.


MY CODE >

   </footer>

</div>
<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 src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script src="js/scripts.js"></script>
</body>
</html>

this is the bottom. is i change the position an put lightbox on the bottom it will work but disables <script src="js/scripts.js"></scrip.

any help will do.

thax

RE: multiple scripts
by pch - Thu Feb 03, 2011 01:47:42 PM
The problem is that  you are using two different Javascript libraries. Prototype and jQuery. The lightbox is written in prototype and your tab function probably with with jQuery. I would either look for a Prototype tab function or find a lightbox jQuery plugin.

But the more complicated route is using jQuery's noConflict() function. More info on that at: http://api.jquery.com/jQuery.noConflict/

RE: multiple scripts
by ricki - Thu Feb 03, 2011 03:04:04 PM
hey

Thax for the Help really appreciated it. is there any tutorial for fixing this problem ? or anybody that explaines whant is going on, im kinda new to jquery. :(

thax



   THREAD CLOSED  
©2009 DevelopPHP.com