PDA

View Full Version : jQuery Image Magnify not magnifying



Dazza30
08-30-2009, 01:36 PM
1) Script Title: jQuery Image Magnify

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagemagnify.htm

3) Describe problem: Ive gone wrong somewhere and i dont understand why.

Ive downloaded the two files and inserted the script into the head tag of my page.

Also ive added the class="magnify" inside the image tag, the problem i have is the zoom in cursor appears but nothing happens when i click.

Im assumeing its got something to do with the origional image size or some alteration i need to make withing the a js file.

Please could someone advise?

ddadmin
08-30-2009, 08:08 PM
Please post a link to the page on your site that contains the problematic script so we can check it out.

Dazza30
08-30-2009, 11:53 PM
I am unable to provide a link at the momment as i dont have hosting sorted yet.

Could the problem be as simple as i didnt include width, height or border attributes, that can be seen in the sample below?

Or could it be how i size my images, currently i set image size
when i create them with photoshop, I dont set image size via html or css?


<img border="0" src="listenmusic.jpg" width="200" height="150" class="magnify">

ddadmin
08-31-2009, 08:17 PM
Not having width/height attributes defined inside the image shouldn't make a difference. The most likely obvious error would be that one of your references to the external parts of the script are broken:


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="jquery.magnifier.js">

/***********************************************
* jQuery Image Magnify- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>


Check both references above are correct (ie: not broken), especially to the file jquery.magnifier.js on your server.

hamzawi
09-01-2009, 12:24 AM
1) Script Title: jQuery Image Magnify

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagemagnify.htm

that code contain an error,i have corrected it :



here is my example: