Response title
This is preview!
I've already activated the .js file and added the detail in .info, I can see it from the firebug that is ok, but from firebug console I can see that I have syntax errors.
From Drupal website I can see an example:
(function ($) { // Here code javascript })(jQuery);
Can someone show me how the code above should look like into Drupal? Thanks.
(function($) {
Drupal.behaviors.yourCustomName = {
attach: function (context, settings) {
$(document, context).scroll(function () {
var y = $(this).scrollTop();
if (y > 100) {
$('.bottomMenu').fadeIn();
} else {
$('.bottomMenu').fadeOut();
}
});
}
};
})(jQuery);
© 2013 jQuery Foundation
Sponsored by and others.