SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2007
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The two scripts both use window.onload to start themselves. The second one will overwrite the first. A quick solution is to remove one of the window.onload statements and incorporate it into the first.
    Remove:
    Code:
    window.onload = populate;
    in the second script.
    Change:
    Code:
    if (document.getElementById) { window.onload = swap };
    to
    Code:
    if (document.getElementById) {
        window.onload = function() {
            swap();
            populate();
        };
     }

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2007
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your scroller content is a string broken across multiple lines. Maybe try building it up:
    Code:
    var scrollercontent = '<ul>';
    scrollercontent += '<li><img src="images/client1.jpg" alt="client kotak" /></li>';
    scrollercontent += '<li><img src="images/client2.jpg" alt="client galfer" /></li>';
    scrollercontent += '<li><img src="images/client3.jpg" alt="client kotak 1" /></li>';
    scrollercontent += '<li><img src="images/client4.jpg" alt="client galfer1"></li>';
    scrollercontent += '</ul>';


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
  •