PDA

View Full Version : jQuery Image Magnify v1.1 help



joegti10
07-29-2010, 08:40 PM
1) Script Title: jQuery Image Magnify v1.1

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

3) Describe problem:

I have this running inside an accordian. Here is the link with it running...

http://www.truwebdesign.com/portfolio/

The image that shows up already opened in the accordian magnifies fine, now if i open the panel below it, the image there does not magnify. I do see the script working with it on the image, if you look close you can see a 1x1 pixel 'magnifiying'...

Also, it functions fine in IE but not FF.

Hope this made sense.

azoomer
07-29-2010, 11:29 PM
Hi Joegti10, I took a look at your page, but unfortunately I couldn't find out why it is behaving like that. It's strange, it is working in a way, but instead of enlarging the pics, reducing the size to 0px x 0px. It is probably because of some conflict between one of the many different scripts on your page. There is a javascript error in IE that you might wanna check out. Another thing i noticed is that you are loading the jquery library 6 different times on your page, that should hardly be necessary. One time would probably be enough.
I guess you will have to outcomment the scripts one by one in order to find the conflict, unless someone else can see where the problem is. Some of the scripts are in noconflict mode but not all and that can also present some problems. I would guess that it is safer to write all the on page jquery in this syntax. jQuery(document).ready(function($) { ???????? });
Hope you get it fixed. Please make a post if you find the problem.

joegti10
07-29-2010, 11:42 PM
Thanks for your reply.

Im very new to using jquery....maybe someone can point me in the right direction so i can load jquery ONCE. I only know how to get things working by loading it with each plugin i install.

joegti10
07-30-2010, 12:05 AM
Alright, i fixed it.

1. I figured how how to load jquery once, LOL.

2. Put all the scripts in no conflict mode.

3. Loaded the magnifier script first, before everything else.

Thanks for the tips azoomer. I guess this is why its called 'learning'.

azoomer
07-30-2010, 12:13 AM
Usually it is enough just to have just one link to jquery in the head section. If you are using old scripts there could be need for a specific version, but I would guess that you don't even have to make any links to jquery, because wordpress already has jquery in it's library. You can see this link in your sourcecode
http://www.truwebdesign.com/wp-includes/js/jquery/jquery.js?ver=1.4.2
I think that is loaded automatically by wordpress.
If possible, I would try to comment out all the other links to jquery one by one and see if it still works without these links. If it still works you can delete the links after that. It would make your page load faster.
I am not sure how you install the plugins though. Do you insert them in your template, or are some of them regular plugins that are installed in the admin panel ? If it is the last option you may need a different approach

azoomer
07-30-2010, 12:16 AM
Hey I just saw your last post, thats great. I must say you are a quick learner. Well done

joegti10
07-30-2010, 01:04 AM
Thanks :)

While im here and people are reading...can someone explain why plugins have to be in a certain order in my header for them all to work 'in harmony'? Ive found during my crash course in the last 2 weeks since first starting playing with js/jq that if i simply rearrange via trial and error it fixes them.

If that even made sense. lol.

azoomer
07-30-2010, 01:26 AM
I have exactly the same experience, but i can't come up with an explanation. I guess the reason would vary for different pages with different scripts. But I tend to try the same ( rearranging the order) if it doesn't work.