let currDir = {'loc':'','contents':null}; let currSel = {'loc':'','path':''} function doUpdate(ele,isDir=false){ //console.log(ele.attr('data-choice')); if(ele.hasClass('file-isDir')){ currDir.loc = ele.attr('data-choice'); populateContents(); } if(!isDir){ $('.nav-bottom-text').html(ele.html()) } //$() //$(this). } function updateContents(contents){ //console.log(contents) // Change top header contents $('#files-location').html(currDir.loc) // if empty, return null, this shouldnt execute if the server is responding properly but ok if(contents===null) { $('#files-table').append(`