mirror of
https://github.com/jgthms/bulma
synced 2026-03-15 10:14:29 -07:00
Add heading
This commit is contained in:
@@ -2,6 +2,23 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
// Dropdowns
|
||||
|
||||
const $metalinks = getAll('#meta a');
|
||||
|
||||
if ($metalinks.length > 0) {
|
||||
$metalinks.forEach($el => {
|
||||
$el.addEventListener('click', event => {
|
||||
event.preventDefault();
|
||||
const target = $el.getAttribute('href');
|
||||
const $target = document.getElementById(target.substring(1));
|
||||
$target.scrollIntoView(true);
|
||||
window.history.replaceState(null, document.title, `${window.location.origin}${window.location.pathname}${target}`);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Dropdowns
|
||||
|
||||
const $dropdowns = getAll('.dropdown:not(.is-hoverable)');
|
||||
|
||||
if ($dropdowns.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user