Results 1 to 2 of 2

Thread: Accordion Content Script (v-2.0) with added option ("scrolltoheader")

  1. #1
    Join Date
    Nov 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Accordion Content Script (v-2.0) with added option ("scrolltoheader")

    1) Script Title: Accordion Content script (v-2.0) with added option ("scrolltoheader")

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...daccordion.htm

    3) Describe problem: Greetings to all. This is my first posting at DD. The problem or rather the 'challenge' I have is with the added option ("scrolltoheader") used to scroll the expanded header in question after it expands (when a header contains long content) to the top edge of the browser window. Everything works as this great script is supposed to but with the 'scrolltoheader' feature, I want to be able to have it scroll not to the very top edge of the browser windows but instead to about 16 pixels below that top edge.

    I have looked and looked and tried a few things but just can't figure out what I need to change or add. I assume the change is to be made to the 'ddaccordion.js' but I'm not entirely sure. I am not a coder in the least sense, I'm just a copy and paste weenie.
    This is the link to the page I am working on:

    fix-my-computer.net/top-web

    Please remember though that I know nothing about coding but I can type, copy and paste
    Thank you kindly in advance to anyone who can offer some how to help.

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    Code:
    	scrollToHeader:function($targetHeader){
    		ddaccordion.$docbody.stop().animate({scrollTop: $targetHeader.offset().top-16}, 400)
    	},
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

Similar Threads

  1. Replies: 1
    Last Post: 03-20-2010, 10:48 AM
  2. defaultexpanded option in Accordion Content script doesn't work
    By urbini in forum Dynamic Drive scripts help
    Replies: 24
    Last Post: 06-25-2009, 05:55 PM
  3. Switch Content Script - Problems with option boxes
    By MydKnight in forum Dynamic Drive scripts help
    Replies: 10
    Last Post: 06-27-2008, 06:30 PM
  4. Tab Content Script Option When Javascript is Disabled
    By bell1 in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 05-18-2006, 04:26 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
  •