summaryrefslogtreecommitdiff
path: root/js/quick-reply.js
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-15 08:00:02 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-15 08:00:02 +1000
commit59aa89a84b730e920fd6ff62e9c32c6b57aadbed (patch)
treee92ee48051cd8436cd412a900dbac1e4d4e6228b /js/quick-reply.js
parentaf657bc6e73e63751e74d7f854ab46f13c3a8e08 (diff)
hide quick reply shit when scroll't up
Diffstat (limited to 'js/quick-reply.js')
-rw-r--r--js/quick-reply.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/quick-reply.js b/js/quick-reply.js
index 3fcdb331..ac125b0c 100644
--- a/js/quick-reply.js
+++ b/js/quick-reply.js
@@ -147,11 +147,20 @@ var show_quick_reply = function(){
$('#body').val($(this).val());
});
// Synchronise other inputs
- $('form[name="post"] input[type="text"],select').bind('change input propertychange', function() {
+ $('form[name="post"]:first input[type="text"],select').bind('change input propertychange', function() {
$postForm.find('[name="' + $(this).attr('name') + '"]').val($(this).val());
});
$postForm.find('input[type="text"],select').bind('change input propertychange', function() {
- $('form[name="post"] [name="' + $(this).attr('name') + '"]').val($(this).val());
+ $('form[name="post"]:first [name="' + $(this).attr('name') + '"]').val($(this).val());
+ });
+
+ $origPostForm = $('form[name="post"]');
+
+ $(window).scroll(function() {
+ if ($(this).scrollTop() < $origPostForm.offset().top + $origPostForm.height() - 100)
+ $postForm.fadeOut(100);
+ else
+ $postForm.fadeIn(100);
});
};