我需要你的帮助。 如何在名称空间中使用变量? 事情是这样的:jQuery:命名空间,在另一个使用变量
所有的$.MyScript = {
script: $("script")
, dataID: script.data("id")
, dataColor: script.data("color")
, Alerting: function alerting(){
alert(dataColor);
}
}
$.Myscript.Alerting;
好的,谢谢你dfsq – 2013-03-03 10:08:11
@JohnSmit标记您的提问。[接受这个答案](http://meta.stackexchange.com/a/5235/165614)作为解决你的问题的解决。只需点击该答案左上方的勾号(在投票下面)。 – Shef 2013-03-03 10:13:45