Skip to content Skip to sidebar Skip to footer

Jquery Enlarge Image From Thumbnail In Jquery Error

I'm trying to replicate an example of an jquery plugin that enlarges image from thumbnail at my desktop and the problem is , the image doesn't enlarge from the thumbnail whenever I

Solution 1:

The solution to your problem is simply moving the import of the JavaScript file. It should be placed at the end after your two <img> tags.

<imgsrc="http://placehold.it/250x150/cf5"data-full="http://placehold.it/860x590/cf5"alt="" /><imgsrc="http://placehold.it/250x150/fof"data-full="http://placehold.it/860x590/fof"alt="" /><scripttype = "text/javascript"src ="trouble.js"></script>

It's standard practice to load your javascript files either last in the head or last in the body. Putting script tags inside of other html tags such as <div> as you have done is not normal but I've never seen it have ill effects like this before.

Post a Comment for "Jquery Enlarge Image From Thumbnail In Jquery Error"