add medilab template
This commit is contained in:
31
web/healthcare/medilab/js/custom.js
Normal file
31
web/healthcare/medilab/js/custom.js
Normal file
@@ -0,0 +1,31 @@
|
||||
(function($) {
|
||||
|
||||
// Add smooth scrolling to all links in navbar
|
||||
$(".navbar a,a.btn-appoint, .quick-info li a, .overlay-detail a").on('click', function(event) {
|
||||
|
||||
var hash = this.hash;
|
||||
if (hash) {
|
||||
event.preventDefault();
|
||||
$('html, body').animate({
|
||||
scrollTop: $(hash).offset().top
|
||||
}, 900, function() {
|
||||
window.location.hash = hash;
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(".navbar-collapse a").on('click', function() {
|
||||
$(".navbar-collapse.collapse").removeClass('in');
|
||||
});
|
||||
|
||||
//jQuery to collapse the navbar on scroll
|
||||
$(window).scroll(function() {
|
||||
if ($(".navbar-default").offset().top > 50) {
|
||||
$(".navbar-fixed-top").addClass("top-nav-collapse");
|
||||
} else {
|
||||
$(".navbar-fixed-top").removeClass("top-nav-collapse");
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user