I am new to coding and I need help adding a scrollTop margin of +100px to my code. The page already has some top margin but I can't seem to locate it. I'm also having trouble finding where the margin-top is being set in the JavaScript file.
/*************
* = Parallax *
*************/
jQuery(document).ready(function ($) {
//Cache some variables
var links = $('.nav').find('li');
slide = $('.slide');
button = $('.button');
mywindow = $(window);
htmlbody = $('html,body');
//Create a function that will be passed a slide number and then will scroll to that slide using jquerys animate. The Jquery
//easing plugin is also used, so we passed in the easing method of 'easeInOutQuint' which is available throught the plugin.
function goToByScroll(dataslide) {
var offset_top = ( dataslide == 1 ) ? '0px' : $('.slide[data-slide="' + dataslide + '"]').offset().top;
htmlbody.stop(false, false).animate({
scrollTop: offset_top
}, 1500, 'easeInOutQuart');
}
//When the user clicks on the navigation links, get the data-slide attribute value of the link and pass that variable to the goToByScroll function
links.click(function (e) {
e.preventDefault();
dataslide = $(this).attr('data-slide');
goToByScroll(dataslide);
$(".nav-collapse").collapse('hide');
});
//When the user clicks on the navigation links, get the data-slide attribute value of the link and pass that variable to the goToByScroll function
$('.navigation-slide').click(function (e) {
e.preventDefault();
dataslide = $(this).attr('data-slide');
goToByScroll(dataslide);
$(".nav-collapse").collapse('hide');
});
});