I'm trying to change a variable depending on what it's current value is:
window.addEventListener("popstate", function(e) {
if (direction === leftnav){
direction = rightnav
}
else{
direction = leftnav
};
loadPage(location.pathname);
});
this doesn't seem to work somehow :s can someone help me with this? Thanks in advance :)
EDIT: here is the full js file: http://pastebin.com/7zZseW74
EDIT 2: what seems to happen is that the loadPage function just does not seem to fire...
direction,leftnavandrightnav? Your example is too vague to be answerable...direction,leftnav, andrightnav?