Tag Archive: jQuery

Oct 29

SharePoint 2013 Workspace Scroll Issue Fix

Some of you may have run into an issue using SharePoint 2013 where the SharePoint created div #s4-workspace does not properly set the height and width of the workspace container. I have run into this problem for accounts not granted administrative privileges (the accounts that are unable to see the SharePoint ribbon). A quick fix …

Continue reading »

Jul 07

Verify jQuery Version is at Least 1.x.x

Small function to verify if the jQuery library loaded is at least version 1.x.x (where you define the minimum version). Note this function does NOT need jQuery loaded to work, so you can use it to check if jQuery is loaded and version compare if you wish. if (jqueryGreaterThan(‘1.4.4’)) { // jQuery passed version verification, …

Continue reading »

Jun 30

Attach .scroll() to AJAX loaded content

If you need to listen for a scroll event on AJAX loaded content that is not the window.scroll or document.scroll you may have realized that the .scroll() event does not bubble. All hope is not lost, you can still achieve this (especially if you are needing to do it with an element with overflow:auto; or …

Continue reading »

Mar 20

Replace default hashtag scrolling in browser

Tired of the fluid-less jumps when going to a URL with a #hashtag? You can replace this using jQuery’s .scrollTo() method in the document.ready of your javascript. Here’s an example: $(document).ready(function() { if(window.location.hash) { $(‘html, body’).animate({ scrollTop: $(window.location.hash).offset().top }, 1000); } }); Now on page load this will fluidly scroll to the DOM element you’ve …

Continue reading »