Skip to content

Commit

Permalink
Merge pull request #1 from OpenDRR/wp-app-header-opacity
Browse files Browse the repository at this point in the history
Adjust header opacity based on scroll position
  • Loading branch information
drotheram authored Oct 31, 2024
2 parents dc990cf + e78bb4b commit e00df96
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion site/assets/themes/fw-child/resources/js/child-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ var child_logging = true

$(document).data('child_theme_dir', child_theme_dir)

// Scroll event handler
$(window).scroll(function() {
if ($(this).scrollTop() > 50) {
$('#main-header').css('background-color', 'rgba(236, 241, 244, 1)');
} else {
$('#main-header').css('background-color', 'rgba(236, 241, 244, 0.5)');
}
});

//
// HEADER
//
Expand Down Expand Up @@ -189,7 +198,6 @@ var child_logging = true
})

}

if (child_logging == true) {
console.log('end of child-functions.js')
console.log('- - - - -')
Expand Down

0 comments on commit e00df96

Please sign in to comment.