SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Feb 2005
    Posts
    537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need some help with possible optimization of script.

    I am wondering if anyone might be willing to look at a javascript I am using, to see if and if so how it might be optimized. I didn't create the script, so I don't really have the ability to do so myself.

    The part of it that I am concerned about is mainly the changeImages() function, since its an ancient piece of code that seems to be working pretty poorly in IE in particular, as it never seems to stop loading the images.

    Code:
    function changeImages() {
      if (document.images) {
        for (var i=0; i<changeImages.arguments.length; i+=2) {
          document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
        }
      }
    }
    The whole script can be found here:

    http://www.hippoiathanatoi.com/HA-Menu.js

  2. #2
    SitePoint Evangelist
    Join Date
    Feb 2005
    Posts
    537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hope its okay if I try bumping this one, to see if anyone has any thoughts on it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •