Warning: range(): Argument #1 ($start) must be a single byte, subsequent bytes are ignored in
/home/skattf/public_html/wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line
657
Warning: range(): Argument #2 ($end) must be a single byte, subsequent bytes are ignored in
/home/skattf/public_html/wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line
657
Warning: range(): Argument #1 ($start) must be a single byte, subsequent bytes are ignored in
/home/skattf/public_html/wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line
658
Warning: range(): Argument #2 ($end) must be a single byte, subsequent bytes are ignored in
/home/skattf/public_html/wp-content/plugins/buddypress-first-letter-avatar/buddypress-first-letter-avatar.php on line
658
merv
Warning: Attempt to read property "supported_until" on string in
/home/skattf/public_html/wp-content/themes/helpdesk/core/libraries/vendors/bbpress/init.php on line
109
Thanks !
This is the code I’m using:
in header.php find the line:
————————
<header id=”header” class=”clearfix”>
————————
Above it paste:
————————
<script>
jQuery(“document”).ready(function($){
var nav = $(‘#header’);
$(window).scroll(function () {
if ($(this).scrollTop() > 90) {
nav.addClass(“f-nav”);
} else {
nav.removeClass(“f-nav”);
}
});
});
</script>
<style>
.f-nav{ z-index: 9999; position: fixed !important; left: 0; top: 0; width: 100%; }
</style>
————————
That’s it !
PS, the 90 in the line “if ($(this).scrollTop() > 90) {” is the default height of the header set in style.css
I can place the css code in the style.css
Any tips on where to neatly insert the jquery code ?