Javascript add
Jack_Sparrow - March 6, 2008 - 08:40
| Project: | Internet Corporation |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Thanks for a great theme.
I'm trying to get the main image - intro.jpg to rather be a fade in of a variety of images using a javascript.
How do I go about doing this?
I've tried adding
<script src="scriptpath.js"></script> to page.tpl.php, at the intro div, but it doesn't work.
I've tried adding
<?php
function drupal_add_js($data = NULL, $type = 'module', $scope = 'header', $defer = FALSE, $cache = TRUE) {
if (!is_null($data)) {
_drupal_add_js('javascriptpath.js', 'core', 'header', FALSE, $cache);
_drupal_add_js('javascriptpath.js', 'core', 'header', FALSE, $cache);
}
return _drupal_add_js($data, $type, $scope, $defer, $cache);
}
?>as described here - http://api.drupal.org/api/function/drupal_add_js/5
I get a "can't call drupal_add_js again"
I know this is simple, but I'm losing... please help?

#1
Well what I used is I just commented the intro.jpg in the CSS file and then Created different blocks and using sub slogan location
then you can change the visibilty but remeber you need to add or specify the img src in the block and filter the block code to be full HTML so u can use img src code in the block
#2
I am closing as this issue is rather old. If the user is still having this issue, please reopen.