Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Onmousewheel Event?

Discussion in 'Website Design Forum:' started by Rhonda, Jan 18, 2010.

  1. Rhonda

    Rhonda Senior Member

    I came across a neat little effect that I'd love to try and learn to make work. It is on a site called "JavaScript Kit" and essentially what happens is you hover your mouse over an image, and scrolling up or down using the mouse wheel, will change the picture. But the site says the script is supported by IE6, Opera9, Safari2, and Firefox.

    I attempted to use it but in a Google Chrome browser, but it didn't work. However I don't know if this is because its just not supported by Chrome (yet?) or if the example images were not on my computer. And the site does not really say where the images need to be for the script to work.

    As always keep in mind I am very new to coding. If you need, I can post an example of the script. Guess what I wonder is there a way to make this work in any browser?
  2. Alex L

    Alex L Senior Member

    Sorry, can't answer most of your questions but both Safari and Chrome are built on WebKit so in theory, if something works with one, then it should with the other.
  3. Levi

    Levi Moderator Staff Member

    golive has a load of these mouse over bits built in.
  4. Jazajay

    Jazajay Active Member

    Cant see why this wont work ~ The onmousewheel event of JavaScript

    Ignore Chrome load Safari and test in that, Safari implements everything before Chrome and Chrome is a cop out built on Safari's code, Webkit. :)

    This has been implemented for a while now though in Safari.

    But to get it to work in a non-IE browser you require different code as IE uses a different syntax. That above link works in FireFox so should work fine in Safari. If you need help editing the code paste what you have up and I'll have a look over it for any errors. :)
  5. Rhonda

    Rhonda Senior Member

    Well, that page you linked was where I found it originally. Can't think of anything I would use it for just now except to practice with. Maybe just on a mock up site that is only on my PC's drive. Presumably this could be used with URLs to images that are on line right? I don't have installed but that should be easy enough to try right?
  6. Jazajay

    Jazajay Active Member

    Without testing the code myself I couldn't say for sure as I haven't spent time looking at it but by changing these to reference absolute image paths ~
    var myimages=[

    I cant see why not. That code works in Safari so i cant see why it shouldn't work in Chrome.

    If you get any problems implementing your code let me know. :)

Share This Page