Fixed div with scroll -> deactivate circle expansion effect
-
Hello,
I’ve added a jquery effect to have a div (containing the list of categories) kept “fixed” while scrolling the page. I’ve found a nice script on the web, which I share here in case someone is interested :
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script> $(function () { var msie6 = $.browser == 'msie' && $.browser.version < 7; if (!msie6) { var top = $('#categ').offset().top - parseFloat($('#categ').css('margin-top').replace(/auto/, 0)); $(window).scroll(function (event) { // what the y position of the scroll is var y = $(this).scrollTop(); // whether that's below the form if (y >= top) { // if so, ad the fixed class $('#categ').addClass('fixed'); } else { // otherwise remove it $('#categ').removeClass('fixed'); } }); } }); </script>
Now, this script works very well, but it deactivates the effect on the circled images… Is there a way to have both effects? Or one cancels the other?
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Fixed div with scroll -> deactivate circle expansion effect’ is closed to new replies.