Title: scrollFunction (responsive-scripts.min.js?ver=1.2.6:1) error
Last modified: September 17, 2019

---

# scrollFunction (responsive-scripts.min.js?ver=1.2.6:1) error

 *  Resolved [gbakalian](https://wordpress.org/support/users/gbakalian/)
 * (@gbakalian)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/scrollfunction-responsive-scripts-min-jsver1-2-61-error/)
 * Hello there !
 * After updating the theme to v3.17, i can see a lot of JS errors in the web dev
   console during scrolling on any page.
 * Error message:
    **responsive-scripts.min.js?ver=1.2.6:1 Uncaught TypeError: Cannot
   read property ‘style’ of null at scrollFunction (responsive-scripts.min.js?ver
   =1.2.6:1)**
 * I am using a child theme since my first install in 2012 and had no major problem
   with it.
 * I have left my dev website home page link where you will be able to reproduce
   the errors.
 * What am I doing wrong ?
 * Edit:
    I see that the responsive-scripts.min.js script is trying to get an element
   on the page with the id=”scroll” and store it in ‘mybutton’ variable, but it 
   fails to find it and so when it is latter trying to change the css display property
   with mybutton.style.display=”block” or mybutton.style.display=”none”, the script
   fails and the exception is raised. What is this element with “scroll” id ? And
   what is supposed to be ‘mybutton’ ? A scroll top button ?
 * I will continue investigations while awaiting your lights !
 * Thank you for your help.
    Kind regards. GB
    -  This topic was modified 6 years, 9 months ago by [gbakalian](https://wordpress.org/support/users/gbakalian/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fscrollfunction-responsive-scripts-min-jsver1-2-61-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Theme Author [CyberChimps](https://wordpress.org/support/users/cyberchimps/)
 * (@cyberchimps)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/scrollfunction-responsive-scripts-min-jsver1-2-61-error/#post-11940988)
 * Can you please try by replacing the following line in your child themes footer.
   php with the new line
 * old: <div id=”scroll” title=”Scroll to Top” style=”display: block;”>Top<span>
   </span></div>
 * new: <div id=”scroll” onclick=”topFunction()” title=”Scroll to Top” style=”display:
   block;”>Top<span></span></div>
 *  Thread Starter [gbakalian](https://wordpress.org/support/users/gbakalian/)
 * (@gbakalian)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/scrollfunction-responsive-scripts-min-jsver1-2-61-error/#post-11941282)
 * Hi ! Thanks for your reply,
 * When you said “footer.php”, my two lazy brain sides reconnected…
 * I’m so confused because I just realized that a long time ago I had the need to
   create a footer.php in my child theme to add a modification.
 * I think I’ve been lazy during last updates and I simply didn’t update my footer.
   php for a while…
 * I’m surprised that it did not happen sooner ! ;-P
 * Thank you anyway for your help, very much appreciated,
    Best regards. GB.
    -  This reply was modified 6 years, 9 months ago by [gbakalian](https://wordpress.org/support/users/gbakalian/).
 *  Theme Author [CyberChimps](https://wordpress.org/support/users/cyberchimps/)
 * (@cyberchimps)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/scrollfunction-responsive-scripts-min-jsver1-2-61-error/#post-11944400)
 * We are glad we could assist you.
 * Many more exciting updates coming soon!
 * How’s your experience with Responsive so far?
 *  Thread Starter [gbakalian](https://wordpress.org/support/users/gbakalian/)
 * (@gbakalian)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/scrollfunction-responsive-scripts-min-jsver1-2-61-error/#post-11945470)
 * Hello !
 * My experience is quite good so far thank you !
    I never had the need to use the
   theme advanced functionalities and I never had to make huge modifications in 
   my child theme to meet my requirements. I have only added some css tweaks to 
   deal with dimensions, hiding elements (scroll to top button for example 😉 ),
   moving the Log-In link on the right of the menu, adjust marring, padding, some
   colours and form inputs… That’s pretty much all I’ve done ! For example, yesterday
   I realized that the theme code has evolve enough to get rid of my footer.php 
   modifications in my child theme.
 * Easy as it is ! For me anyway.
    I think the theme basis is strong enough to please
   most of WP users.
 * It’s a good theme, you’ve made a good job here.
    I wish you to continue like 
   this for many years to come !
 * See you soon !
    Best Regards GB.
 *  Theme Author [CyberChimps](https://wordpress.org/support/users/cyberchimps/)
 * (@cyberchimps)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/scrollfunction-responsive-scripts-min-jsver1-2-61-error/#post-11945856)
 * Thank you for your kind words [@gbakalian](https://wordpress.org/support/users/gbakalian/)
 * We are glad we could be part of your website journey!
 * For scroll top button, we are planning to add an option to enable and disable
   from customizer in the upcoming update.
 * It would be great if you can share some feedback [here](https://wordpress.org/support/theme/responsive/reviews/#new-post)
 * Meanwhile, we promise to add more features to enhance your experience!
 * Once again, thank you for choosing Responsive.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘scrollFunction (responsive-scripts.min.js?ver=1.2.6:1) error’ is closed
to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/responsive/6.3.8/screenshot.png)
 * Responsive
 * [Support Threads](https://wordpress.org/support/theme/responsive/)
 * [Active Topics](https://wordpress.org/support/theme/responsive/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/responsive/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/responsive/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [CyberChimps](https://wordpress.org/support/users/cyberchimps/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/scrollfunction-responsive-scripts-min-jsver1-2-61-error/#post-11945856)
 * Status: resolved