mirror of
https://github.com/tchartron/blow
synced 2024-11-27 06:40:31 +00:00
update
This commit is contained in:
parent
42623295bc
commit
94807c5623
2 changed files with 2 additions and 5 deletions
|
@ -1,13 +1,10 @@
|
|||
document.addEventListener("DOMContentLoaded", function() {
|
||||
// ---------------- Selected
|
||||
let navbar_links = document.querySelector('#nav-links').children;
|
||||
let current_location = window.location.href;
|
||||
let selected_navbar_link = [...navbar_links].find((item) => {
|
||||
return (item.href === current_location)
|
||||
})
|
||||
selected_navbar_link.className = "bg-gray-900 text-white px-3 py-2 rounded-md text-sm font-medium"
|
||||
// for (let i = 0; i <= navbar_links.length; i++) {
|
||||
// if (document.querySelector('#nav-links').children)
|
||||
// }
|
||||
console.log(selected_navbar_link);
|
||||
});
|
||||
|
||||
|
|
|
@ -3,5 +3,5 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||
});
|
||||
|
||||
function search() {
|
||||
console.log('search')
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue