Drupal.Behaviors

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Drupal.Behaviors - Presentation Transcript

    1. Introducing Drupal.behaviors presentation by: Tom Friedhof
    2. Review jQuery Basics
    3. Review jQuery Basics $( [find something] ).doSomething();
    4. Review jQuery Basics $( [find something] ).doSomething(); $(“#tabs”).tabs(); CSS Selector jQuery UI Method
    5. The DOM has to be ready $(document).ready(function() { // Code Goes Here });
    6. The DOM has to be ready $(document).ready(function() { $(“#tabs”).tabs(); });
    7. The Drupal Way Drupal.behaviors.loadTabs = function(context) { // Code Goes Here };
    8. The Drupal Way Drupal.behaviors.loadTabs = function(context) { $(“#tabs”).tabs(); };
    9. Why use Drupal.behaviors? • Ability to override JS • Behaviors are re-attachable • Attach Behaviors to a specific context • HTML loaded via AHAH
    10. 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);
    11. Demo Drupal.behaviors
    12. 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
    13. Questions?
    SlideShare Zeitgeist 2009

    + Tom FriedhofTom Friedhof Nominate

    custom

    1092 views, 1 favs, 4 embeds more stats

    LA Drupal Lightning Talk

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1092
      • 1070 on SlideShare
      • 22 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 20
    Most viewed embeds
    • 19 views on http://activelamp.com
    • 1 views on http://al
    • 1 views on http://dev.activelamp.com
    • 1 views on http://74.125.127.160

    more

    All embeds
    • 19 views on http://activelamp.com
    • 1 views on http://al
    • 1 views on http://dev.activelamp.com
    • 1 views on http://74.125.127.160

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Tags