【发布时间】:2012-05-08 00:47:00
【问题描述】:
我可以使用简短方便的美元 jQuery 表示法我正在使用以下代码结构:
(function($) {
$('div#webform-component-team-name').css('background', 'blue');
alert('testing!');
console.log('working...!');
})(jQuery);
但是,除了我的 alert 和 console.log 语句之外,我发现没有任何效果。这些语句工作正常,但改变背景颜色的第二行(或以 $ 开头的任何其他内容)不能。
【问题讨论】:
标签: jquery namespaces drupal-7