Changing JavaScript rollover script

I am trying to implement this JavaScript code on blogspot (which parses XML, some code works better than others)

 </head><body>
<div class="navbar section" id="navbar"><div class="widget Navbar" id="Navbar1"><script type="text/javascript">
    function setAttributeOnload(object, attribute, val) {
      if(window.addEventListener) {
        window.addEventListener("load",
          function(){ object[attribute] = val; }, false);
      } else {
        window.attachEvent('onload', function(){ object[attribute] = val; });
      }
    }
  </script>

      

This code leads to simple wrapping with the following snippet:

<img xsrc="/1.jpg" class="domroll /1flip.jpg" src="/1.jpg">

      

I would like to change the code so that it replaces a different image than the one currently hovering over, but with no luck so far. (perhaps by naming them and passing the names as variables)

Can anyone please help?

thank

0


source to share


1 answer


The JavaScript snippet you posted has nothing to do with rollover images and doesn't create the second snippet.



The first snippet allows you to change the DOM node onLoad attribute in cross-browser mode. You can modify your question to post the relevant snippet.

+1


source







All Articles