Former Member
inherit
guest@proboards.com
251114
0
Nov 26, 2024 23:38:18 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Mar 14, 2022 17:25:36 GMT -8
i need some help please i like to added Navigation Tree Bar to both top and bottom i have added the code to my global header and its not working this is the code i am using
<script type="text/javascript">
$(document).ready(function(){
var navTreeTop = $('#navigation-tree').offset().top + $('#navigation-tree').height();
$(window).scroll(function(){
if($(window).scrollTop() > navTreeTop && !$('#navigation-placeholder').length){
$('#navigation-tree').before('<div id="navigation-placeholder"></div>').insertBefore('.container.quick-reply');
$('#navigation-placeholder').height($('#navigation-tree').height()).css('margin-bottom',$('#navigation-tree').css('margin-bottom'));
} else if($(window).scrollTop() < navTreeTop && $('#navigation-placeholder').length) {
$('#navigation-tree').insertAfter('#navigation-placeholder');
$('#navigation-placeholder').remove();
}
});
});
</script> is this the right code and am i placing it in the right area?
Please help thank you
|
|
Former Member
inherit
guest@proboards.com
181302
0
Nov 26, 2024 23:38:18 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Mar 14, 2022 17:29:29 GMT -8
|
|
#e61919
Support Staff
224482
0
1
Nov 22, 2024 17:59:24 GMT -8
Scott
“Asking for help isn't giving up... it's refusing to give up.”
24,527
August 2015
socalso
|
Post by Scott on Mar 16, 2022 6:11:36 GMT -8
@marti1977 , try this instead:
<script type="text/javascript"> $(document).ready(function(){ var navTreeTop = $('#navigation-tree').offset().top + $('#navigation-tree').height(); $(window).scroll(function(){ if($(window).scrollTop() > navTreeTop && !$('#navigation-placeholder').length){ $('#navigation-tree').before('<div id="navigation-placeholder"></div>').insertBefore('footer'); $('#navigation-placeholder').height($('#navigation-tree').height()).css('margin-bottom',$('#navigation-tree').css('margin-bottom')); } else if($(window).scrollTop() < navTreeTop && $('#navigation-placeholder').length) { $('#navigation-tree').insertAfter('#navigation-placeholder'); $('#navigation-placeholder').remove(); } }); }); </script>
|
|