]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/QnA/js/qna.js
82f9a24b1b1ca963a6e43df1c597820fd1d1cf01
[quix0rs-gnu-social.git] / plugins / QnA / js / qna.js
1
2 var QnA = {
3
4     // hide all the 'close' and 'best' buttons for this question
5
6     // @fixme: Should use ID
7     close: function(closeButt) {
8         $(closeButt)
9             .closest('li.hentry.notice.question')
10             .find('input[name=best],[name=close]')
11             .hide();
12     },
13
14     init: function() {
15         var that = this;
16         $('input[name=close]').live('click', function() {
17             that.close(this);
18         });
19         $('input[name=best]').live('click', function() {
20             that.close(this);
21         });
22     }
23 };
24
25 $(document).ready(function() {
26     QnA.init();
27 });