Need toggle to scroll back to top when closed

Posted on 2014-09-22
Last Modified: 2014-10-04
I'm using readmore.js to toggle some content on this page:

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?
Question by:Alicia St Rose
  • 3
  • 2
LVL 58

Expert Comment

ID: 40337483
Working fine for me when I click Read More
Though why use a plugin, jQuery can do that with one line.

Author Comment

by:Alicia St Rose
ID: 40338237
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...
LVL 58

Expert Comment

ID: 40338251
Yes, will look at it on the tablet tomorrow - still don't know why you are using a plugin for this.

Accepted Solution

Alicia St Rose earned 0 total points
ID: 40338255
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!

Author Closing Comment

by:Alicia St Rose
ID: 40361059
I solved the problem on my own.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jQuery scrollTop 2 40
Securing Wordpress 3 70
WordPress syntax 2 23
jquery conditionally populate list boxes 2 15
Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question ( on how to make a page show some balloons animate up a page…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The viewer will learn how to dynamically set the form action using jQuery.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now