Nearly the best
-
But i miss a “stick/toggle on scroll” π
I’m no speacialist, but i got it running with this jQuery:erstePosition = $('.lwptoc').offset().top; wurdeGestickt = ''; $(window).scroll(function(e){ var $el = $('.lwptoc'); if ($(window).scrollTop() > $('.lwptoc').offset().top){ $el.css({'position': 'fixed', 'top': '70px'}); $el.width($('#main').width()); wurdeGestickt = 'ja'; if($('div').hasClass('lwptoc_items-visible')) { $('a.lwptoc_toggle_label')[0].click(); } } if ($(window).scrollTop() < erstePosition && wurdeGestickt == 'ja' ){ $el.css({'position': 'static', 'top': '70px'}); $el.width('auto'); wurdeGestickt = 'nein'; if(!$('div').hasClass('lwptoc_items-visible')) { $('a.lwptoc_toggle_label')[0].click(); } } });
The topic ‘Nearly the best’ is closed to new replies.