Using JavaScript in Drupal
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Using JavaScript in Drupal

on

  • 26,401 views

An overview of how to use JavaScript in Drupal, including an in-depth look at drupal.js

An overview of how to use JavaScript in Drupal, including an in-depth look at drupal.js

Statistics

Views

Total Views
26,401
Views on SlideShare
26,254
Embed Views
147

Actions

Likes
3
Downloads
175
Comments
1

10 Embeds 147

http://www.slideshare.net 109
http://www.katbailey.net 17
http://katbailey.net 11
http://www.watermis.com 4
http://www.linkedin.com 1
http://watermis.com 1
http://translate.googleusercontent.com 1
http://drupalranch.com 1
http://localhost 1
https://duckduckgo.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Using JavaScript in Drupal Presentation Transcript

  • 1. jQuery in Drupal Part Two DrupalCon Szeged 2008
  • 2. Agenda • Using jQuery in Drupal • Keeping jQuery up to date in Drupal • AJAX • AHAH and Drag&Drop
  • 3. jQuery in Drupal • In core since Drupal 5 (version 1.0.1) • chosen for its small file size • modular, like Drupal itself • has a great community, like Drupal :-)
  • 4. Using jQuery in Drupal • Important functions on the PHP side – drupal_add_js() • Add a JavaScript file, setting or inline code to the page • parameters: data, type, scope, defer, cache • Examples: – drupal_add_js(drupal_get_path(‘module’, ‘mymodule’) .'/myjs.js'); – drupal_add_js(array(‘myjs’=>$mysettings), ‘setting’); – Drupal_add_js(‘var myVar = “foo”;’, ‘inline’);