views:

43

answers:

2

I'm trying to use a zoom plugin for interactive maps

I put everything into the site and as far as I can tell the scripts are all working. There are no console errors so I'm guessing the problem is that the image paths are not correct because nothing except the containing div is showing up. Looking at it through firebug all I can see is the containing div and referenced css. . . Can someone tell me 1. what can I use to diagnose this? and 2. Why isn't anything showing up?

My page is here

A: 

You can use a HTTP traffic tool to figure out if the images are requested and served.

https://addons.mozilla.org/en-US/firefox/addon/6647/

Šime Vidas
@sime Thanks, I'll look into that.
Jason
A: 

The first thing I noticed was this error in firebug:

$("#map").zoommap is not a function

And to me, it looks like the map is the only thing not showing up.

fehays
@fehays - I don't see that error, but that makes sense. What tab are you seeing that error on and what would I need to do to correct the zoommap function?
Jason
It's the firebug console tab. and maybe your $("#map").zoommmap needs to be wrapped in a document.ready event. e.g. - $(function(){ $("#map").zoommap(); });
fehays
Sorry.. ignore that about the ready function. I see that is already being done. not sure what's causing the error
fehays
hmmm. . . I still don't see the error in firefox or chrome (firebug or firebug lt)
Jason
@Jason In Chrome, press Ctrl+Shift+J. This will open the Developer tools. In the bottom right corner you will see a red X icon. That is the error.
Šime Vidas
@Sime That made it show up. Thank you. The error seems to be comming from line 41. Is this script closed properly? There is no comma or semicolon after the left: '176px'
Jason
@Jason Hm, you got line 41? I got line 6 from the setup.js file. The error description is: `Uncaught TypeError: Object #<an Object> has no method 'zoommap'`. I am curious why this is. The zoommap.js plug-ins seems to load properly. ... Why are you running noConflict() earlier in the HEAD?
Šime Vidas
I'm sorry, I don't know js well enough to be able to intelligently answer that question. I read of people saying do this or don't, but I don't know what the difference is. That is how the other jquery plugin was loaded so I just left it there. . .
Jason
@Jason Well, you got this code in the HEAD: `<script type="text/javascript">try{jQuery.noConflict();}catch(e){};</script>`. It is used to deal with conflict between jQuery and other libraries that use the $ identifier. But I don't see that you are using such other libraries. Try removing that line...
Šime Vidas
@Sime I stripped everything out of the header that I could and eliminated the other scrollbar jquery function. I also disabled all but one of the plugins. I don't get the error, but it still doesn't seem to be loading. I posted an isolated copy of the original demo here http://gingertown.org/wp/wp-content/themes/gingertown001/zoommap/example.html
Jason
In the demo the js adds some element properties, in the div I added to the main page, it doesn't seem to be adding those same properties.
Jason
@Jason Your isolated demo seems to be working, right?
Šime Vidas
@Sime Yes. It works.
Jason
@Jason Cool :-)
Šime Vidas
@Sime No, that's the problem is that the demo works fine, but it won't show up in my page. The js is applying element tags that I am guessing control it showing up, but they are not getting applied to the <div id="map"></div> that I inserted into my page.
Jason
I see this error in the Chrome resources: setup.js:6Uncaught TypeError: Object #<an Object> has no method 'zoommap'
Jason
@Jason On your page http://gingertown.org/wp/?cat=154 you have two jQuery references - one for jQuery 1.3 (in the HEAD), and another one for the newest jQuery (in the #sidebar UL element). Why did you put that reference inside the #sidebar element? Anyways, you should have only one jQuery reference... remove the other one.
Šime Vidas
@Sime Grrr. Okay, I still had one plugin activated and it is the one adding the extra jquery reference to the sidebar. If I deactivate that plugin the zoom map shows up correctly. I can't have that plugin deactivated though because I need the twitter feed on the page. I also have other plugins that use jquery. How do I deal with the plugins referencing it themselves? I guess since they all work with each other running then I need to change the reference to jquery in the zoom map, would that be correct?
Jason
How would I make it only reference the copy of jquery that it contains or how do I make it reference whatever generic copy the other plugins are referencing. I didn't write any of them they were just "click here" plugin installations.
Jason
@Jason From what I understand about jQuery plug-ins, you place the reference for jQuery by yourself (via a SCRIPT element), and then you add your plug-ins (via additional SCRIPT elements). Each plug-in is a JavaScript file. It may be that some plug-ins cannot work with the new version of jQuery (1.4), but I don't understand what you mean when you say that the plug-in is adding the extra jQuery reference. That extra reference is a static SCRIPT element that you probably copy-pasted into the #sidebar UL, right? The plug-in did not add it for you, you yourself added it.
Šime Vidas
@Sime This is a wordpress-based site. For most of the plugins I just have to go to the wordpress plugins catalog and select the install plugin button and it installs it itself. I don't add or change any files.
Jason
Šime Vidas
@Sime Will do. Thank you very much for all the help!
Jason