我有一些JS在我的本地计算机上运行完美,只要我将其上传到我的Web服务器就会停止运行。该网站是www.turnbulldesigns.co.uk,如果你想看看。
我已从本地计算机上传了整个文件夹结构,因此没有错误/丢失文件。什么可以阻止以下JS上传后的工作?
$(document).ready(function ($) {
$(".orange").click(function () {
$("#colors").attr("href", "colors/orange.css");
});
$(".blue").click(function () {
$("#colors").attr("href", "colors/blue.css");
});
$(".green").click(function () {
$("#colors").attr("href", "colors/green.css");
});
$(".red").click(function () {
$("#colors").attr("href", "colors/red.css");
});
$(".violet").click(function () {
$("#colors").attr("href", "colors/violet.css");
});
$(".pink").click(function () {
$("#colors").attr("href", "colors/pink.css");
});
$(".yellow").click(function () {
$("#colors").attr("href", "colors/yellow.css");
});
$(".tan").click(function () {
$("#colors").attr("href", "colors/tan.css");
});
$(".grey").click(function () {
$("#colors").attr("href", "colors/grey.css");
});
$('.color-switcher li a').click(function (e) {
$(this).parent().parent().find('a').removeClass('active');
$(this).addClass('active');
})
})