• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Drupal.Behaviors
 

Drupal.Behaviors

on

  • 24,136 views

LA Drupal Lightning Talk

LA Drupal Lightning Talk

Statistics

Views

Total Views
24,136
Views on SlideShare
23,623
Embed Views
513

Actions

Likes
2
Downloads
128
Comments
3

11 Embeds 513

http://activelamp.com 179
http://www.slideshare.net 172
http://julian.pustkuchen.com 119
http://www.activelamp.com 31
https://duckduckgo.com 6
https://www.linkedin.com 1
http://translate.googleusercontent.com 1
http://al 1
http://74.125.127.160 1
http://dev.activelamp.com 1
http://www.slideee.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

13 of 3 previous next Post a comment

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

    Drupal.Behaviors Drupal.Behaviors Presentation Transcript

    • Introducing Drupal.behaviors presentation by: Tom Friedhof
    • Review jQuery Basics
    • Review jQuery Basics $( [find something] ).doSomething();
    • Review jQuery Basics $( [find something] ).doSomething(); $(“#tabs”).tabs(); CSS Selector jQuery UI Method
    • The DOM has to be ready $(document).ready(function() { // Code Goes Here });
    • The DOM has to be ready $(document).ready(function() { $(“#tabs”).tabs(); });
    • The Drupal Way Drupal.behaviors.loadTabs = function(context) { // Code Goes Here };
    • The Drupal Way Drupal.behaviors.loadTabs = function(context) { $(“#tabs”).tabs(); };
    • Why use Drupal.behaviors? • Ability to override JS • Behaviors are re-attachable • Attach Behaviors to a specific context • HTML loaded via AHAH
    • Why use Drupal.behaviors? • Ability to override JS • Behaviors are re-attachable • Attach Behaviors to a specific context • HTML loaded via AHAH Drupal.attachBehaviors(elem);
    • Demo Drupal.behaviors
    • Resources http://api.drupal.org/api/file/developer/topics/javascript_startup_guide.html/6 http://raincitystudios.com/blogs-and-pods/katherine-bailey/the-lowdown- jquery-drupal-part-two http://www.chapterthree.com/blog/josh_koenig/ handling_aysnchronous_data_drupal_session_materials
    • Questions?