mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-17 10:46:01 +00:00
Modules
This commit is contained in:
4
node_modules/ref/docs/scripts/jquery-1.7.2.min.js
generated
vendored
Normal file
4
node_modules/ref/docs/scripts/jquery-1.7.2.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
25
node_modules/ref/docs/scripts/main.js
generated
vendored
Normal file
25
node_modules/ref/docs/scripts/main.js
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
/**
|
||||
* Animated scroll to named anchors.
|
||||
*/
|
||||
|
||||
$(document.body).on('click', 'a', function () {
|
||||
var href = $(this).attr('href')
|
||||
if (href[0] === '#') {
|
||||
scrollTo(href)
|
||||
window.history && history.pushState({}, name, href)
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
function scrollTo (hash) {
|
||||
var name = hash.substring(1)
|
||||
var target = $('a[name="' + name + '"]')
|
||||
if (target.length) {
|
||||
$('html, body').animate({ scrollTop: target.offset().top }
|
||||
, { duration: 500, easing: 'swing'})
|
||||
} else {
|
||||
console.log('documentation not written: %s', name)
|
||||
}
|
||||
return target
|
||||
}
|
Reference in New Issue
Block a user