• Hi guys and gals,
    My domain is https://www.bfdesigns.co.uk, and on my current site I have a nifty little Jquery feature which when clicked takes you back to the top of the page. I have customised it to include my own graphic and positioning.
    For consistency sake I wanted to include this feature on my new and shiney WP blog, Im just slightly confused how to link to the external JQ scripts and where to place my inline Jquery script, if you view the source code of my site, I have 1 external js file in the head called top.js and then directly before the body tag closes I have :

    <script type="text/javascript">
      $(document).ready(function(){
    		$(window).scroll(function() {
    			if($(this).scrollTop() != 0) {
    				$("#toTop").fadeIn();
    			} else {
    				$("#toTop").fadeOut();
    			}
    		}); //ends .scroll function
    
    				$("#toTop").click(function() {
    					$('body,html').animate({scrollTop:0},2000);
    				});	//ends .click function
    
      });//Ends document.ready function
     </script>

    Any help will be greatly apprecaited, as it will effectively show me how to link to external and inline Jquery scripts in the future ??

    Thankyou

    Benisjamin

  • The topic ‘Wanting to use my Jquery "back to top" feature on WP Blog – How do I install ?’ is closed to new replies.