Results 1 to 2 of 2

Thread: Get and set position of content

  1. #1
    Join Date
    Dec 2016
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Get and set position of content

    1) Script Title: Scrollable content script v2.0

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm

    3) Describe problem: I want to use a scrollable content in an html-form. Is it possible to get information of the position of the content and set the position for the next display of the form? After submit the form and display the form again, the content should have the old position.
    Bernd

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The belt divisions can apparently be accessed directly via jQuery and their left or top css obtained or set. For the the vertical one:

    Code:
    $('.belt').css('top')
    will get you the position and:

    Code:
    $('.belt').css('top', '-120px')
    will set it.

    It's similar for the horizontal one, only you use 'left' instead of 'top' in the above examples. If you have more than one scrollable feature on the page, you need to specify which one you want. They are indexed from 0 to however many there are, so to get the second one, if it's horizontal, you would do:

    Code:
    $('.belt').eq(1).css('left')
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    B.Altmann (03-21-2017)

Similar Threads

  1. Drop-in content box v2.0 positive position bug
    By jscheuer1 in forum Bug reports
    Replies: 1
    Last Post: 01-27-2015, 05:11 AM
  2. Resolved Position problem with DD/Overlapping Content
    By alexp in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 04-30-2009, 10:31 AM
  3. Dropdown content position
    By carsal in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 05-08-2008, 05:24 AM
  4. Scrollable Content II default content position?
    By bholland in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 08-04-2006, 04:30 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
  •