let currDir = {'loc':'','contents':null}; function doUpdate(ele){ console.log(ele.attr('data-choice')); if(ele.hasClass('file-isDir')){ currDir.loc = currDir.loc+ "/"+ ele.attr('data-choice'); populateContents(); } //$() //$(this). } function updateContents(contents){ //console.log(contents) $('#files-location').html(currDir.loc) if(contents===null) $('#files-table').append(`