Commit 2293ed9a authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

debug next/previous barre de navigation #123

parent 025e4dcc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -122,11 +122,11 @@ class MaxTEI extends AbstractMax {
        //local function : find next or previous nav link
        let nextOrPrevious = function (step) {
            let current = document.getElementById("navigation-tool").querySelector('button').getAttribute("data-target").replace("selected-", "");//remove 'selected' prefix
            let newCurrent = current.replaceAll(".", "\\.")
            let links = document.getElementById('dropdown-navigation').querySelectorAll('li');
            let position = -1;
            console.log(links);
            links.forEach((link, index) => {
                if(link.dataset.target === newCurrent){
                if(link.dataset.target === current){
                    position = index;
                }
            })