(function ($) { Drupal.behaviors.madlibs = { attach: function(context, settings) { // This will fire when the document is ready. // Get a pointer to the mad libs container. jMadLibsContainer = $( "#madlibs" ); // Get all of the madlib elements (defined by Span // objects with the rel=madlib). jMadLibs = $( "span[rel='madlib']" ); // Create a form element and wire up the onsubmit // to fire the show mad libs and then return false // so that the form doesn't submit anywhere. jMadLibsForm = $( "