drupal7 不能使用美元符号的原因
(function ($) { // Original JavaScript code. })(jQuery);
?
可以使用闭包解决
The $ global will no longer refer to the jquery object. However, with this construction,
the local variable $ will refer to jquery, allowing your code to access jQuery through $ anyway,
while the code will not conflict with other libraries that use the $ global.
(function ($) {// Create the tooltips only on document load$(document).ready(function() {// By suppling no content attribute, the library uses each elements title attribute by default$('#content a[href]').qtip({// Simply use an HTML img tag within the HTML stringcontent: 'dfdfdfdfdf'});});})(jQuery);
?
ebook library