You are here

jquery, javascript and drupal

Wiki Terms: 
hello

This is an example of an effect which is built into the core jQuery library. This text should fade in after the DOM is loaded. drupal_add_js() was used to add the fadeIn effect to any paragraph with the class jtest.

This jquery code works: to affect page.tpl.php put it in template.php instead!

//drupal_add_js ('$(document).ready(function(){$("p").hide().fadeIn("slow").slideUp("slow").slideDown(" slow") ;}); ','inline');drupal_add_js ('$(document).ready(function(){$(\'a[href$="authentication-options"]\').html("Log In");}); ','inline');


IMPORTANT NOTE Drupal currently uses a different way to access external drupal scripts
drupal_set_html_head('');
and I read it is drupal_add_html_head() for Drupal 7

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer