PDA

View Full Version : IE setting to allow "Magnify" sctipt's Zoom-In cursor to display?



BobBerg
09-21-2012, 06:29 PM
1) Script Title: jQuery Image Magnify v1.11

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

3) Describe problem: Only on some IE (8 and 9) PCs can we not see the Zoom-In cursor. On my other "identical???) IE (8 and 9) equipped PCs it shows up fine. This includes both the site I am developing using the Image Magnify script and even when viewing the demo "girl wearing headphones" on the DynamicDrive site.

Based on the above, I am assuming the problem is not related to the script (relative versus absoluter url) or to browser capability - since I have some IE 8 and 9 PCs showing it fine. Therefore I am looking at what might be configured differently on the individual problem PCs. This is a big deal to me because one of the PCs having the problem is my development laptop (Windows 7 64-bit, IE9, ThinkPad) - I also want to be sure most of our customers will not have the issue.

a) I have been told that IE caches the cursor, so to clear its history and cookies - did not help.

b) Google Chrome shows the magnifying glass fine, so I assume it is not a mouse cursor setting issue, but I went and tried changing all those settings - with no success.

c) I was able to go onto several sites that have demos of alternate custom cursor icons to test. Even my problem PCs had no issue seeing the custom cursor on those sites.

I am also wondering if the problem might not be the display of the custom cursor, but rather that IE is not detect a mouse over (hover) so that it never even tries to invoke the cursor substitution. Can anyone help me with what to try and change on my problem PCs?

jscheuer1
09-22-2012, 12:59 AM
Where it has like:


jQuery.imageMagnify={
dsettings: {
magnifyby: 3, //default increase factor of enlarged image
duration: 500, //default duration of animation, in millisec
imgopacity: 0.2 //opacify of original image when enlarged image overlays it
},
cursorcss: 'url(magnify.cur), -moz-zoom-in', //Value for CSS's 'cursor' attribute, added to original image
zIndexcounter: 100,

refreshoffsets:functi . . .

Make it like so:


jQuery.imageMagnify={
dsettings: {
magnifyby: 3, //default increase factor of enlarged image
duration: 500, //default duration of animation, in millisec
imgopacity: 0.2 //opacify of original image when enlarged image overlays it
},
cursorcss: 'url(magnify.cur), -moz-zoom-in', //Value for CSS's 'cursor' attribute, added to original image
/*@cc_on @*/
/*@if(@_jscript_version >= 5)
cursorcss: 'url(magnify.cur), pointer', //Value for CSS's 'cursor' attribute, added to original image
@end @*/
zIndexcounter: 100,

refreshoffsets:functi . . .

BobBerg
09-23-2012, 12:08 PM
Thanks for the reply.

I did paste your added code in there, but it only ended up breaking the Zoom In effect altogether - for IE. Chrome still works fine.

I should point out that these lines of new code all show up as "green" (comment) text - in Expression Web. However, since it did break IE, that code is obviously not being recognized as just a comment.

I was suppressed to see the attempted fix as a code change. Does this mean the the likely differnce is that my IE "problem" PC's are running a newer version of Java Script - than my working PCS?

BobBerg
09-23-2012, 12:47 PM
Never mind, I am just too green at this yet. I had used what you pasted a bit too literally. By paying a bit more attention when I removed all the /* on your code snippet, it came alive as "non-comment" code - and worked as you intended. Sorry about that.

While I have you attention, are either of these two enhancements possible?

1) Displaying caption text when zoomed in (e.g. the image's Alt text and/or it's Long Description text)?

Thanks again - I really need this IE fix to roll out this cool magnify feature in our site!

jscheuer1
09-23-2012, 12:56 PM
Are you saying it broke all IE, even those where it had been working before? If done correctly it shouldn't break any IE.

Here, use this version of the script which is already properly configured for IE and all others (right click and 'Save As'):

4751

No editing required.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

BobBerg
09-24-2012, 10:45 AM
It only broke things because I pasted it in without correctly removing all of the lead-in /* comment characters. I am all set now - thank you very much.

Did you see my question about a captioning enhancement request? Specifically, is it possible to display caption text when zoomed in (e.g. the image's Alt text and/or it's Long-Description text)?"

jscheuer1
09-24-2012, 11:22 AM
You shouldn't have to remove anything. I missed the other request because you made it while I was responding about the the cursor changes breaking the script. Where would this caption go? This is beginning to sound like one of those threads where just one more feature is requested, and then another. How about a close button? How about an overlay so that the rest of the page is dimmed while viewing the larger image? How about the ability to group images so that once one's viewing a larger image you can move to the next in the group from it?

All of these features and more are already available in other scripts. Rather than rewrite this one, perhaps we could pick a script that has all of the features you might want and you could use it.

BobBerg
09-26-2012, 03:11 AM
I understand the problem with never-ending enhancement requests. The features we would want in another script would be replication of the existing magnify script (clean and functional) along with a caption box. The caption would ideally come from each image’s "Long Description" field - it might appear (in a gray-background box) at the bottom of the image.

Any idea if such a beast exists - and where? If there is nothing out there, is this practical - as a paid enhancement to Magnify?

Thanks!

jscheuer1
09-27-2012, 12:46 PM
I'm sure there is. It would be your responsibility to find it though. If I knew offhand I would tell you.

But I figured out a way to adapt the script:

http://home.comcast.net/~jscheuer1/side/image_magnify/index-longdesc.htm

Before I go explaining it's finer points. Is that what you had in mind?

I've just updated the demo linked to above. There area number of options for the caption now. The first image shows the current default method, the second shows it with a different look, perhaps more what you were asking for.

Again, let me know if this will work for you or not before I go into detail about it.