Title: Problem with jQuery-theme.js
Last modified: August 24, 2016

---

# Problem with jQuery-theme.js

 *  Resolved [Alexander Georgiev](https://wordpress.org/support/users/ageorgiev/)
 * (@ageorgiev)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-jquery-themejs/)
 * I am developing completely new theme with bootstrap but I have a problem with
   jquery-theme.
    **It works perfectly on the front-page, however does not work 
   properly in posts and pages.** It is enqueue correctly because when I delete 
   the navigation jquery code, it does not work in posts,pages, everywhere.
 *  wp_enqueue_script(‘simplicity-theme’, get_template_directory_uri() . ‘/js/jquery.
   theme.js’, array(‘jquery’), true);
 * In Pages, Posts (everywhere else actually)
    - Sticky Navigation Menu Works (gets the code)
    - Scroll-to-top and bootstrap tooltip – does not work
 * **Scroll-to-top**
 *     ```
       $(window).scroll( function(){
               if($(window).scrollTop() > 150) {
                   $('#scroll-to-top').addClass('displayed');
               }
               else {
                   $('#scroll-to-top').removeClass('displayed');
               }
           } );
           $('#scroll-to-top').click( function(){
               $("html, body").animate( { scrollTop: "0px" } );
               return false;
           } );
       ```
   
 * **Bootstrap tooltip**
 *     ```
       $(document).ready(function(){
         $('[data-toggle="tooltip"]').tooltip();
       });
       ```
   

The topic ‘Problem with jQuery-theme.js’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [Alexander Georgiev](https://wordpress.org/support/users/ageorgiev/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-jquery-themejs/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
