Closed (fixed)
Project:
Custom Add Block
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
12 Dec 2012 at 18:52 UTC
Updated:
4 Jan 2014 at 02:42 UTC
Jump to comment: Most recent
Modify the Javascript. Use the example and advice in comment 7 of the Project Application.
So your code would look more like:
(function ($) { /** * TODO: This is an example: * Provide the toggle features for the custom_add_block_jquery */ Drupal.behaviors.customAddBlockJquery = { attach: function(context, settings) { $('#block-custom-add-block-custom-add-block-jquery').once('custom_add_block', function () { // When site loaded, hide the Popupbox First [...The rest of your JS code and logic should be here...] } } })(jQuery);You will have to try to figure out what to do with your functions, how they could be declared and how you could rework slightly your JS code, but I guess this would simply require a little bit more testing.
Comments
Comment #1
willisiw commentedBehaviors are implemented.
Comment #2
willisiw commented