Reputation: 51
how to add a JavaScript file in Ctools modal popup ?
I added the js file (datatables.js) in the .tpl.php file but it does not work?
The popup does not detect this file?
drupal_add_js(drupal_get_path('module', 'my_module') . '/jquery.dataTables.min.js');
Upvotes: 2
Views: 1290
Reputation: 345
We're using document.ready and ajaxComplete:
$(document).ready(function () {
Drupal.behaviors.nameSpace.functionName();
});
and
$(document).ajaxComplete(function () {
Drupal.behaviors.nameSpace.functionName();
});
Clearly not a DRY solution, but it solves the problem for now.
Upvotes: 1