mirror of
https://github.com/jgthms/bulma
synced 2026-03-15 02:04:29 -07:00
Add heading
This commit is contained in:
@@ -4,6 +4,23 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
// Dropdowns
|
||||
|
||||
var $metalinks = getAll('#meta a');
|
||||
|
||||
if ($metalinks.length > 0) {
|
||||
$metalinks.forEach(function ($el) {
|
||||
$el.addEventListener('click', function (event) {
|
||||
event.preventDefault();
|
||||
var target = $el.getAttribute('href');
|
||||
var $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
|
||||
|
||||
var $dropdowns = getAll('.dropdown:not(.is-hoverable)');
|
||||
|
||||
if ($dropdowns.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user