![]() |
Javascript Errors!! Lightbox and toggle
I am trying to get lightbox working on my site but am having a few problems,
The only way i can get it to work is if I remove another section of javascript which controls a toggle sidebar Even if I just remove the jquery.min.js from the script below then the lightbox starts to work, I've tried calling lighbox first and moving it around but no luck, any ideas? Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>Code:
<script type="text/javascript"> |
Sweet! just fixed it with no conflict
Code:
<script type="text/javascript">jQuery.noConflict();</script> |
Your solution is not a solution, it’s just fixing the symptoms and shows me that you haven’t quite understood how to use jQuery (and you using jQuery 1.3.2 while we’re at version 1.7.1 shows that, too). Apparently you have included the framework twice which isn’t necessary in 99% of all cases. If you showed us your complete source code and not just a few lines, then we would even be able to help you actually fix your issue.
|
Yep your right I don't understand Jquery yet but i will learn soon :o
ok so I only need to include the latest version of jQuery once? here's the rest of my code for the site Code:
<!--Bing Webmasters Verification--> |
Ah, no, I see. You used both, the jQuery and prototype libraries in one document. Since they are two different frameworks that do have similar function names, however, they are incompatible, and that’s why it wasn’t working. You should decide for one library (prototype, jQuery, or whatever else) and stick with it. And then you look for plugins/extensions for that one library. Since jQuery is the most popular JS framework, there are plugins for virtually everything, there are even multiple lightbox type plugins. So remove the lightbox you have right now and use one for jQuery. I can recommend fancybox. And remember: If you have included the core library file already you don’t need the jQuery file tha might be provided with the plugin.
|
| All times are GMT +1. The time now is 03:05 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.