...

View Full Version : enlarging picture onclick



spudly1987
05-18-2012, 12:56 AM
Hey my name is vince, I am new to this site and was wondering if someone can assist me with some thing, I am trying to make it so when i click on a thumbnail image it enlarges to the actual size of the image which i would like it to be like "lighthouse" or a "jquery" example where it has the "x" in the top right hand corner you click on the "x" and then the larger image goes away and then you can click on another thumbnail or the same one again. below is the code that I have so far and so far all it does is when you click on the thumbnail it enlarges it but thats it if anyone can help me that would be great.


<html>

<head>

<title>My Images</title>

</head>

<body>



<!-- Lightbox 2-->

<noframes></noframes><noscript></noscript><!-- --><script type="text/javascript" src="http://www.freewebs.com/p.js"></script><script src="js/jquery-1.7.2.min.js"></script>

<script src="js/lightbox.js"></script>'

<link href="css/lightbox.css" rel="stylesheet" />



<!-- Your Stuff -->

<a href="http://i50.tinypic.com/jud25s.png" rel="lightbox" title="my caption">

<img src="https://flpics2.a.ssl.fastly.net/1232/1232189/0004beb6-9d99-646e-62d4-3bbda4708284_110.jpg" alt="" />

</a>



<!-- --><script type="text/javascript" src="http://static.websimages.com/static/global/js/webs/usersites/escort.js"></script><script type="text/javascript">if(typeof(urchinTracker)=='function'){_uacct="UA-230305-2";_udn="none";_uff=false;urchinTracker();}</script></body>

</html>




i uploaded the text to webs.com so that you can see how it works here is the link

http://www.freewebs.com/justts/index.htm

dan-dan
05-18-2012, 01:38 AM
For a start, things aren't going to work if you have your CSS in your body. Place it in your head.


<link href="css/lightbox.css" rel="stylesheet" />


Sort that out and tell us what's happening.

spudly1987
05-18-2012, 02:01 AM
okay I fixed it and did what you suggested below


<html>
<head>
<title>My Images</title>
<link href="css/lightbox.css" rel="stylesheet" />
</head>
<body>

<!-- Lightbox 2-->
<noframes></noframes><noscript></noscript><!-- --><script type="text/javascript" src="http://www.freewebs.com/p.js"></script><script src="js/jquery-1.7.2.min.js"></script>
<script src="js/lightbox.js"></script>'


<!-- Your Stuff -->
<a href="http://i50.tinypic.com/jud25s.png" rel="lightbox" title="my caption">
<img src="https://flpics2.a.ssl.fastly.net/1232/1232189/0004beb6-9d99-646e-62d4-3bbda4708284_110.jpg" alt="" />
</a>

</body>
</html>

and still get the same results

http://www.freewebs.com/justts/index.htm

Slivee
05-18-2012, 06:58 AM
the title says it all, i have a photo album, i have created a seperate frame for a list of all the pictures, and would like an enlarged version to change depending on which thumbnail has been clicked.
NewEgg Promotional Code (http://in.answers.yahoo.com/question/index?qid=20120516020642AAuTr0p)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum