Jump to content

jquery


jnf555

Recommended Posts

<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",src="jquery.js"></script> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /><script type="text/javascript">$(document).ready( function(){ $("#box1").animate({left:"0px",top:"50px",width:"150px",height:"150px"},500);}); </script>src="jquery.js"i have tried to incorparate this jquery in my script, but its not being recogised, can anyone tell me the correct wayjnf555

Link to comment
Share on other sites

sorry for not giving more detail, its the section i am trying to include in my lite box script <script type="text/javascript" src="js/lightbox.js",src="jquery.js"></script>
right... well, would you mind reposting the entire code in context? ideally within [ code ] tags?can you tell us if you are getting any errors?
Link to comment
Share on other sites

This script tag won't work:<script type="text/javascript" src="js/lightbox.js",src="jquery.js"></script>What are you intending to do with it?

Link to comment
Share on other sites

i am trying to make an img animate into position then when clicked enlarge using lightbox, but the scripts wont work together<html><head><title></title> <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> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <script type="text/javascript" src="jquery.js"></script><script type="text/javascript">$(document).ready( function(){ $("#box1").animate({left:"100px",top:"150px",width:"150px",height:"150px"},500);}); </script> <style type="text/css">body{background-color:gray}#container{width:790px;height:900px;margin:auto;position:relative;background-color:white;}.thumbnail{position:absolute;}</style></head><body > <div id="container"><div id="box1" class="thumbnail"><a href="picture2.jpg" rel="lightbox"title=""><img src="picture2.jpg" width="150" height="150" alt=""</div></div></div></body></html>

Link to comment
Share on other sites

I know we've gone over this beforehttp://w3schools.invisionzone.com/index.ph...mp;#entry213294did you try this?

jquery also has it's own lightbox implementation as well. might be easier to merge that into your app since you are already using jquery
http://www.google.com/#hl=en&cp=11&amp...440&bih=779first result yields this:http://leandrovieira.com/projects/jquery/lightbox/I've used it, so I know it works with jQuery. It will reduce the need on other library dependancies just for a plugin/effect.
Link to comment
Share on other sites

yes, i have tried before to do this and failed.i should stick at it and get it donethanks jnf555
Without knowing the errors you are facing now mixing the current libraries vs. just using only the jquery library makes it hard for us to tell if one solution was getting you closer to the answer or not. Just saying 'it didn't work' it too vauge to accurately help someone debug a problem like this. When you try something but it doesn't work, no matter what option you tried, it is always best to come back with the full code, any errors you are seeing in the console, and what behavior you are experiencing vs. what you expected. I can only assume part of the problem currently may be mixing libraries. Using one in my mind would certainly eliminate any conflicts, unless you use jQuery.noConflict, but just using one library in general seems more practical for you anyway.http://api.jquery.com/jQuery.noConflict/
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...