I’m new to javascript and jQuery and I’m trying to make it so that when site loads on a mobile device that I add an anchor link to each nav link. I want to do this because when you click on a new link you can’t tell if you are on the same page or not.
http://dev.newstartlaw.clients.blinkss.com/criminal-law/
Here is what I’ve done, but I can’t get it to work
$(document).ready(function(e) {
//retrieve window width
var width = $(window).css("width");
//Check to see if browser window is less than 481 pixels
if(width < 481px) {
//If the browser window is less than 481px then append #content to is
$(".menu-mobile-main-container ul li a").append("#content2nd");
}
});
});