View Full Version : Resolved Simple Image Panner and Zoomer - jQuery issue (can't use $ in scripts))

06-24-2011, 02:42 PM
1) Script Title: Simple Image Panner and Zoomer v1.1

2) Script URL (on DD):

3) Describe problem:

Any pages I add the image panner script it kills my jQuery scripts.
Even on a simple page like the below.

<script type="text/javascript" src="js/jquery-min.js"></script>
<script type="text/javascript" src="js/imagepanner.js"></script>
<script type="text/javascript">

I get an error `$ is not a function`. This stops any jQueries from running at all.

I can use jQuery instead of $, but I've written a lot jQuery script which uses $ and it would take a while to rewrite them all.

Please help me with this as I'm having no luck solving this one myself.



06-24-2011, 03:13 PM
In imagepanner.js comment out this line as shown:

/* Simple Image Panner and Zoomer (March 11th, 10)
* This notice must stay intact for usage
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code

// v1.1 (March 25th, 10): Updated with ability to zoom in/out of image


var ddimagepanner={

magnifyicons: ['magnify.gif','magnify2.gif', 24,23], //set path to zoom in/out images, plus their dimensions
maxzoom: 4, //set maximum zoom level (from 1x)

init:function($, $img, options){
var s=options
s.imagesize=[$img.width(), $im . . .

06-29-2011, 03:31 PM
Wow something so simple, thanks a million.

Excellent can someone please close this topic and mark as solved.