DrupalBin
Submit Code
About
Recent Posts
float?
2 hours 52 min
ago
views handler
6 hours 23 min
ago
Code
6 hours 38 min
ago
Code
6 hours 39 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for Add JavaScript to specific node
View
Download
Fix
August 20, 2008 - 6:59pm — Anonymous
/**
* Add JavaScript
*/
if
(
arg
(
0
)
==
'node'
&&
arg
(
1
)
==
$nid
&& !
arg
(
2
)
)
{
drupal_add_js
(
base_path
(
)
.
path_to_theme
(
)
.
'/js/jquery.scrollTo-1.3.3-min.js'
,
'theme'
,
'header'
,
FALSE
,
$cache
)
;
drupal_add_js
(
base_path
(
)
.
path_to_theme
(
)
.
'/js/jquery.localscroll-1.2.6-min.js'
,
'theme'
,
'header'
,
FALSE
,
$cache
)
;
drupal_add_js
(
base_path
(
)
.
path_to_theme
(
)
.
'/js/toc.js'
,
'theme'
,
'header'
,
FALSE
,
$cache
)
;
}
javascript
jquery
template.php