Add new comment

It would look something like this:

(function($) {
Drupal.behaviors.my_node_toggle = {
attach: function(context, settings) {
$(".toggler", context).click(function(){
$(this).next().slideToggle("slow");
return false;
}).next().hide();
});
}
};
})(jQuery);

That said, I believe your javascript could be put in an external file and added using a preprocess funciton to keep the template free of non-markup! :) Sorry, don't mean to be annoying or a stickler! :)

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.