Results 1 to 2 of 2

Thread: Pausing up-down Scroller duplicate problem

  1. #1
    Join Date
    May 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Pausing up-down Scroller duplicate problem

    1) Script Title: Pausing up-down Scroller

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

    3) Describe problem: hello i am trying to add this on an OSC shopping cart..how can i create 2 instances of this? i tried on the second one with
    var pausecontent2=new Array()
    pausecontent2[0] and so on but it won't work..any help please?
    the first one reads the products from the database while the second one displays normal images...when i add them both on separate files the 1st one is on the 2nd instance too..thank you

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    You should have no problem getting multiple instances of the script running on the same page (as seen in the demo on the script page, which shows 2 instances). Your two content arrays may look something like:

    Code:
    var pausecontent=new Array()
    pausecontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!'
    pausecontent[1]='<a href="http://www.codingforums.com">Coding Forums</a><br />Web coding and development forums.'
    pausecontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'
    
    var pausecontent2=new Array()
    pausecontent2[0]='<a href="http://www.news.com">News.com: Technology and business reports</a>'
    pausecontent2[1]='<a href="http://www.cnn.com">CNN: Headline and breaking news 24/7</a>'
    pausecontent2[2]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'
    While your two initialization codes may look like:

    Code:
    new pausescroller(pausecontent, "pscroller1", "someclass", 3000)
    
    new pausescroller(pausecontent2, "pscroller2", "someclass", 2000)

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
  •