Tagged Questions

0
votes
2answers
87 views

drupal_add_js causes blocks to be executed twice

I added this code to template.php (in Zen subtheme): function mytheme_preprocess_page(&$vars) { if ($vars['is_front']) { drupal_add_js (libraries_get_path('jquery.cycle') . ...
0
votes
4answers
266 views

drupal_add_js in html template file

I am using a zen subtheme and I am trying to add some javascript using the drupal_add_js on a certain node. When I use the drupal_add_js from within the html--node--XX.tpl.php file, it does not work. ...
2
votes
2answers
54 views

use drupal_add_js for file outside drupal dir

I would like to add a js file thats outside my drupal installation dir, but keep it relative to that dir. mysite |-- drupal |-- dirWithJsFile |-- thisfile.js i have already tried things ...
0
votes
3answers
2k views

How to auto resize the height of an iframe with Jquery?

Any idea on how to automatically resize the height of an iframe based on its content. The iframe source is coming from different domain. Any thoughts on how to achieved it via Jquery or native JS? ...
3
votes
2answers
107 views

Weighting Javascript in .info files

Drupal 7 adds a new 'weight' option to drupal_add_js so that you can control the order in which Javascript files are added to the page. Is there any way to do this when adding Javascript in .info ...