Results 1 to 4 of 4

Thread: Looking for mod for Switch Content Script!

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

    Question Looking for mod for Switch Content Script!

    Ive recently dived into responsive design for use with mobile devices. Im really enjoying the concept and its got me back into web design. Ive been using Switch Content Script (http://www.dynamicdrive.com/dynamici...tchcontent.htm) as this is a perfect way to build my site foundations for mobile websites. However, Ive run into an issue and would kindly ask if anyone knows how to do a simple (I believe) task with the Switch Content Script.

    Id like for it to pop the selected to the top of the device. That is, when a user clicks (touchs lets say the link on an iPhone), the script would pop the content to the top of the screen. As it stands now, when you touch a link, it does open the content up, however, you have to scroll down the page to view the content rather than when you touch the link, it starts at the top of the page.

    I hope you understand what Im trying to describe here. And please, any help would be appreciated. TIA.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,920
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    This script doesn't go to the top of the page when one of its triggers is activated. If it does on your page, you've done something wrong.

    On the other hand, if you've placed all the triggers in one location - say at the top of the page, and the expanding content elsewhere, lower on the page, I could see a reason to want the page to scroll to the expanded content.

    However, this script:

    http://www.dynamicdrive.com/dynamici...daccordion.htm

    already does that. On the demo page, see the example titled:

    onClick example with icon indicators:
    - John
    ________________________

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

  3. #3
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    @jscheuer1

    Indeed that scripts onClick function is exaclt what Im looking for. However, I cannot use that script because if you notice, you click on a link, it expands then scrolls to the top, but, when you click another link, the other links youve clicked stay expanded. Also, the script Im using is much smaller.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,920
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    Read through the demo page. It can be configured to only allow one item open at a time. The script size is immaterial, even with the Google hosted jQuery code, which most users will already have cached anyway, the size of the script is smaller than most images, so will not contribute noticeably to the load time of the page.
    - John
    ________________________

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

Similar Threads

  1. Switch Content Script access the switch from two places on same page?
    By gotoplanf in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 04-02-2012, 02:14 PM
  2. Persistance Problem When Installing Both Switch Content and Switch Menu Script
    By Crimsonbat in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 03-29-2006, 06:00 AM
  3. Replies: 4
    Last Post: 01-27-2006, 10:51 AM
  4. Replies: 0
    Last Post: 11-05-2005, 04:25 AM
  5. Switch tables or iframes by Switch Content Script
    By komi in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 07-26-2005, 02: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
  •