I am currently working on setting up a website with a sticky sidebar.
If you would like to see the page, click this link:
On a specific subpage of the site, I am attempting to make an image Validator sticky, but unfortunately, it's not functioning as expected. Here is an example code snippet that I have tried:
function fixDiv() {
var $cache = $('#validator');
if ($(window).scrollTop() > 100) $cache.css({
'position': 'fixed',
'top': '10px',
'right': '40px'
});
else $cache.css({
'position': 'absolute',
'top': '75px',
'right': '40px'
});
}
$(window).scroll(fixDiv);
fixDiv();
However, my main issue lies in creating a sticky menu and so far, I haven't come up with a viable solution.