More fixes
This commit is contained in:
18
js/custom.js
18
js/custom.js
@@ -1,21 +1,15 @@
|
||||
// $('.navbar-collapse a').click(function(){
|
||||
|
||||
// $(".navbar-collapse").collapse('hide');
|
||||
// $('#nav-icon3').toggleClass('open');
|
||||
// });
|
||||
|
||||
$('a.nav-link').click(function(e) {
|
||||
var target = $($(this).attr("href"));
|
||||
// x = position.left + parseInt($element.css('marginLeft'), 10);
|
||||
var marginTop = parseInt(target.css('paddingTop'), 10);
|
||||
var marginTop = parseInt(target.css('paddingTop'), 10);
|
||||
if (target.attr('id') === 'second') {
|
||||
marginTop = 0;
|
||||
}
|
||||
$('html, body').animate({
|
||||
// scrollTop: 700
|
||||
scrollTop: target.offset().top - marginTop
|
||||
}, 1000);
|
||||
scrollTop: target.offset().top - marginTop
|
||||
}, 1000);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
|
||||
// scrollTop: $("#myDiv").offset().top
|
||||
});
|
||||
|
||||
if ($(window).width() < 767) {
|
||||
|
||||
Reference in New Issue
Block a user