Title: WordPress jQuery version issues
Last modified: August 31, 2016

---

# WordPress jQuery version issues

 *  Resolved [c-m](https://wordpress.org/support/users/c-m/)
 * (@c-m)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/wordpress-jquery-version-issues/)
 * Can anyone see any reason why this simple script doesn’t work with the WordPress
   included jquery (v1.11 -1.12)?
 *     ```
       <script type="text/javascript">
   
       $(document).ready(function () {
   
           $(window).scroll(function () {
               if ($(this).scrollTop() > 500) {
                   $('.scrollup').fadeIn();
               } else {
                   $('.scrollup').fadeOut();
               }
           });
   
           $('.scrollup').click(function () {
               $("html, body").animate({
                   scrollTop: 0
               }, 900);
               return false;
           });
   
       });
       </script>
       ```
   
 * It’s a simple script for a back-to-top button. If I manually load jquery 2.x 
   from Google or elsewhere, it works just fine.

Viewing 1 replies (of 1 total)

 *  Thread Starter [c-m](https://wordpress.org/support/users/c-m/)
 * (@c-m)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/wordpress-jquery-version-issues/#post-7309222)
 * Solved.
 * It’s due to wordpress loading jQuery in no conflict mode.
 * Either replacing $ with jQuery, or setting $ as a function of jQuery on document
   ready works.

Viewing 1 replies (of 1 total)

The topic ‘WordPress jQuery version issues’ is closed to new replies.

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 1 reply
 * 1 participant
 * Last reply from: [c-m](https://wordpress.org/support/users/c-m/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/wordpress-jquery-version-issues/#post-7309222)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
