[support] Jquery code revision...
Yani
akayani at aapt.net.au
Sat Jun 1 02:31:59 UTC 2013
I need a hint on this... I've mentioned it before but couldn't get my head
around it and put it in the too hard basket. Of course it has come back and
bitten me again.
What's happening is my JS code is causing some other code to break.
There are 2 ways I've used the JS...
_____
(function($) {
Drupal.behaviors.zeroPoint = {
attach : function(context, settings) {
//Drupal Jquery wrapper
Button items in here that call functions
//end wrapper
}
}
})(jQuery);
// Note the wrapper is different for Drupal Behaviors
_____
function manageBlocks(menu) {( function($) {
$(document).ready(function() {
// jQuery wrapper
Functions actions in here
//end wrapper
});
})(jQuery);
}
_____
Can I just lift the functions up and place them within the top section or do
I need to write the bottom section differently.
It just seems odd that this wouldn't be correct as is.
The sort of things it impacts are Facebook blocks that don't update and the
file upload MCE losses all JS abilities.
Note... it's been 12 months since I've touched this and I'm most brain dead
on it!
Yani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130601/4dbf48c8/attachment.html
More information about the support
mailing list