Jump to content

animate then lightbox


jnf555

Recommended Posts

hi i can make an img animate onto the page from nothing, i can click an img to enlarge using litebox.but i am haveing dificulty makeing it work together.the idea is for imges to animate onto the page, then when clicked enlarge into a light box.anyone help please.<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:"40px",top:"210px",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;background-color:silver;}</style></head><body> <div id="container"><div> <a href="picture3.jpg" rel="lightbox[roadtrip]" ><img id="box1" class="thumbnail" src="picture3.jpg" alt"" width="0px" height="0px"></a></div></div></body></html>if i remove the litebox lines the animation worksthanks jnf555

Link to comment
Share on other sites

Check about javascript's createElement, appendChild etc. Should help about..Like you first create element, some div, and then you set properties for that, and next you appendChild that div with img tag and source..

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...