create a js module to handle the question forms
[shapado:piglops-shapado.git] / public / javascripts / modules / panel_forms.js
1 $(document).ready(function() {
2   $("a#add_reward, a#add_question_comment, a#add_answer").click(function(event) {
3     var link = $(this);
4     var toolbar = link.parents("ul");
5     var id = link.attr("id");
6
7     var form = $("#panel-forms form."+id);
8
9     $("#panel-forms form").slideUp();
10
11     form.slideToggle("slow");//
12     toolbar.find("li a").removeClass("active");
13     link.addClass("active");
14
15     return false;
16   });
17 });
18