我正在尝试在Javascript中获取文件的当前目录,这样我就可以使用它来为我站点的每个部分触发不同的jquery函数。
if (current_directory) = "example" {
var activeicon = ".icon_one span";
};
elseif (current_directory) = "example2" {
var activeicon = ".icon_two span";
};
else {
var activeicon = ".icon_default span";
};
$(activeicon).show();
...
有什么想法吗?
https://stackoverflow.com/questions/3151436
复制相似问题