Problem with jQuery-theme.js
-
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.