JSFiddle - React, Tailwind, and code Playground
by bluey
JavaScript
$(function () {
//val = $(location).attr('href');
val = 'myfuckingurl_about';
val = val.substr(val.indexOf("_") + 1);
//alert(val);
if (val) {
goTo(val);
//alert(val);
}
});
function goTo(val) {
switch (val) {
case "about":
about();
break;
case "derp":
derp();
break;
}
}
function about() {
alert('ABOUT!');
}
function derp() {
alert('DERP');
}
function schmekle() {
alert("default")
}