SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Close Slide-to-top Accordion from Codrops

    I've built a Wordpress site using Codrops Slide-to-top Accordion.

    My content is pretty long so if you want to close the accordion you have to scroll all the way up again to the header of that post.
    I choose the one that had more than one open accordion because of height-calculation didn't work on iPhone.

    How can I make so click anywhere on the content also would close the accordion? Or a close-button at the end of the post?

    View my test site


    Thanks in advance!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,333
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    Off Topic:

    Personally, I wouldn't recommend a script like that, for a few reasons:

    - it makes the page very slow to load, so visitors may give up and leave
    - the functionality is a bit confusing, and it's not clear where to click to get to the content
    - there is no content at all if JavaScript is disabled ... which is a real sin.

    Just saying ...

  3. #3
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,097
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi there,

    I agree with what Ralph says, but if you want to make this work how you describe, I can help you.

    So that I don't have to wade through your code and work out what's where, it would be good if you could make a minimal test page with a two-panel accordion on it (strip out all the unnecessary styles, content, JS etc) .

    Let me know when you've done that and we'll take it from there.


Tags for this Thread

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
  •