hide quick reply shit when scroll't up

This commit is contained in:
Michael Foster 2013-09-15 08:00:02 +10:00
parent af657bc6e7
commit 59aa89a84b

View File

@ -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);
});
};