Results 1 to 5 of 5

Thread: Floating Top Bar script - More than one instance on a page?

  1. #1
    Join Date
    Jan 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Floating Top Bar script - More than one instance on a page?

    Hi guys, I've been messing around with this floating top bar script and I've been trying my best to configure it so that I can have two sidebars, one on the left and one on the right. The idea is they will house links that scroll down with the page as the user works their way down. The trouble is, even with changing a lot of the coding it doesn't seem to like running concurrently. Is there a way I can have two instances of this script working on one page or am I just bashing my head against a wall here. Thank you in advance guys. Oh and DD, smashing site big thanks for the great scripts as always.

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.

  3. #3
    Join Date
    Jan 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry here is the thread...

    http://www.dynamicdrive.com/dynamicindex17/floatbar.htm

    Thanks guys

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    This particular script wasn't designed to have more than one instance on a page: all of its references to the "topbar" are hardcoded. You could create a second copy of the script, changing all of the references to topbar to topbar2 (or, whatever), but that's really not a solution.

    I'm interested, though. When I get home I'll see how difficult it would be to rewrite this to accept arbitrary element ID's. I don't think it would be particularly difficult.

    ---------------
    If you want help with your attempt, you'll need to share the code you've been working with.

  5. #5
    Join Date
    Jan 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS instead

    Thanks very much for your help but in the meantime I have just found it far easier to use css and a fixed positional attribute to create the side bars I needed. It actually runs a lot smoother than the javascript version as well. I did try completely re-writing the code so that none of it conflicted but to no avail, for some reason it was still preventing one of the bars from scrolling. Oh well, all is well that ends well, thank you very much for your kind offer of help though it was much appreciated.

    Merry Christmas all

Similar Threads

  1. Floating Menu Script - floats off page
    By northyukon in forum JavaScript
    Replies: 5
    Last Post: 02-06-2010, 08:12 PM
  2. Floating top bar script - set cookie per page
    By clivewalker in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 10-22-2007, 08:11 PM
  3. Need to use this script in more than one instance on one page
    By schwim in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 02-27-2007, 03:51 AM
  4. Switch Content Script II -> Specify open/close for every instance
    By Keiser in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 02-26-2006, 06:11 AM
  5. Help Floating or Static menu won't move with page
    By gypsychick007 in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 05-08-2005, 11:42 PM

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
  •