So I want to replace 3 css files on a page, with the possibility of a 4th on certain pages... After reading around, I have this:
$("link").each(function(index) {
switch (index) {
case 1: $this.attr("href","css1.css");
break;
case 2: $this.attr("href","css2.css");
break;
case 3: $this.attr("href","css3.css");
break;
case 4: $this.attr("href","css4.css");
break;
}
});
Unfortunately, this doesn't work. I feel I am using "this" incorrectly but I really don't know.