IE not supporting image swap.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    IE not supporting image swap.

    My javascript is a little sketchy, so forgive me*.

    What I'm doing is pre-loading 2 images with javascript, and then when one image is mouseover'd, that image's src attribute is swapped with the second images.

    You can see it here: Untitled Document

    Works fine in most browsers, but I was stupid enough to assume IE would act the same.

    * Yeah, I hate those 'pitty me' intros too.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    that's because addEventListene r() is not supported by IE. two possibilities, apply attachEvent() for IE or google for the cross browser function addEvent() (there are different available, choose the one you like)

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Originally posted by Dormilich
      that's because addEventListene r() is not supported by IE. two possibilities, apply attachEvent() for IE or google for the cross browser function addEvent() (there are different available, choose the one you like)
      Ah, that's good to know. Cheers, Dorm.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        I wish more people would use Event Listeners. I'm truly relieved I found one in you, although you could have made the onload event this way too.

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          Originally posted by Dormilich
          I wish more people would use Event Listeners. I'm truly relieved I found one in you, although you could have made the onload event this way too.
          Well, to be honest, I only knew of them because of yourself. :P So you can pat yourself on the back.

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            Originally posted by Markus
            So you can pat yourself on the back.
            done........... ........

            Comment

            Working...