Recently, I came across a piece of inherited code that I'm trying to modify to suit my needs. However, I seem to have reached a dead end with customizing it. It seems like the following code snippet is causing some issues:
jQuery(function($){
var photos = [
'cover/001_final.jpg',
'cover/002_final.jpg',
'cover/003_final.jpg',
'cover/004_final.jpg',
'cover/006_final.jpg',
'cover/007_final.jpg',
'cover/008_final.jpg',
'cover/009_final.jpg',
'cover/044_final.jpg',
'cover/085_final.jpg',
'cover/123_final.jpg' ]
$.backstretch(photos[Math.floor(Math.random() * photos.length)]);
$(document.body).on("backstretch.show", function () {
$('body').addClass('load');
});
$('.nav-link a')
.hover(
function() { $(this).addClass('hover'); },
function() { $(this).removeClass('hover'); })
.click(function(){
$(this).removeClass('hover');
});
});
My understanding is that this script randomly loads backgrounds, stretches images, and then loads the menu. However, I'd like to use the menu feature on another page without requiring a stretched background. How can I eliminate the dependency on background loading/stretching and solely load the menu?
Any help or guidance on this matter would be greatly appreciated.