I have placed the following script:
if ( jQuery(window).width() > 1026) {
jQuery('.widgetable').scrollToFixed({marginTop:80,zIndex:9});
}
But when i refresh the page the side bar is not scrolling, when i place this code into the chrome console it works without problem.
Thanks
Alex
When you’re placing script inside your header.php file, its always good to wrap it inside
document.ready
event handler function.This will make sure that the DOM is available when the function executes. Also the
scrollToFixed
plugin would have also finished loading by then.