virtual Posted August 29, 2010 Report Share Posted August 29, 2010 I am having difficulty getting the cursor to turn into a magnifier in both Mozilla and Webkit browsers. In the js file, I have this line cursorcss: 'url(magnify.cur), -moz-zoom-in', //Value for CSS's 'cursor' attribute, added to original image which works fine with Firefox, however if I do this, neither of them work. cursorcss: 'url(magnify.cur), -webkit-zoom-in, -moz-zoom-in', //Value for CSS's 'cursor' attribute, added to original image I can only get one or the other to work, not both at the same time. I also tried adding this into the html file <script type="text/javascript"> $("img").css('cursor', function() { if (jQuery.browser.mozilla) { return '-moz-zoom-in'; } else if (jQuery.browser.webkit) { return '-webkit-zoom-in'; } else { return 'pointer'; } }); </script> but that did not work with either of the browsers. Can anyone tell me what I'm doing wrong. Quote Link to comment Share on other sites More sharing options...
BeeDev Posted August 31, 2010 Report Share Posted August 31, 2010 Have you tried doing them in 2 lines? cursorcss: 'url(magnify.cur), -moz-zoom-in'; cursorcss: 'url(magnify.cur), -webkit-zoom-in'; Quote Link to comment Share on other sites More sharing options...
virtual Posted August 31, 2010 Author Report Share Posted August 31, 2010 Yes I tried that same result, only one works. Quote Link to comment Share on other sites More sharing options...
newseed Posted August 31, 2010 Report Share Posted August 31, 2010 (edited) Just guessing here but doesn't this require that the user have the zoom icon as part of their desktop settings in order for it to work? Update...ok I see what you are doing. It does work but just not both. As Rosanna Anna Danna would say..."NEVERMIND!" Edited August 31, 2010 by newseed Quote Link to comment Share on other sites More sharing options...
virtual Posted August 31, 2010 Author Report Share Posted August 31, 2010 Yes I have an icon image for the cursor, but yeah it doesn't work in both. As you say, "nevermind" but I guess I'll have to put a little tag saying click to enlarge or some people might miss it. Quote Link to comment Share on other sites More sharing options...
virtual Posted September 1, 2010 Author Report Share Posted September 1, 2010 After trying everything, in CSS, JS, etc. etc. A light bulb illuminated the brain and "Ah ha" said she, " I need to put the cursor styling inline! Eureka!". So now it does work in FF and Webkit browsers.....except of course for IE. what else!. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.