Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 117
  • Last Modified:

Need toggle to scroll back to top when closed

Hi!
I'm using readmore.js to toggle some content on this page:

http://sandbox.intrepidrealist.com/eye-specialist-sb/services/

I've got the init script in place but it's not working. I don't see an error in the the console either.
Anyone see what's amiss?
Thanks
0
Alicia St Rose
Asked:
Alicia St Rose
  • 3
  • 2
1 Solution
 
GaryCommented:
Working fine for me when I click Read More
Though why use a plugin, jQuery can do that with one line.
0
 
Alicia St RoseOwner & Principle Developer/DesignerAuthor Commented:
When you click close, does the page auto scroll to the top of the content block. This is more apparent on iPhone or Android. I need it to go back to top...
0
 
GaryCommented:
Yes, will look at it on the tablet tomorrow - still don't know why you are using a plugin for this.
0
 
Alicia St RoseOwner & Principle Developer/DesignerAuthor Commented:
Okay, I'm a doofus!
I forgot that I'd added the init script in an external file. So I suppose there was a bit of a conflict.
It works now.

I'm not well versed in jQuery. Getting better all the time!
Is there a way to do what I need with one line? Don't i need a callback?

I'd rather not use a plugin if I can help it!
0
 
Alicia St RoseOwner & Principle Developer/DesignerAuthor Commented:
I solved the problem on my own.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now