From 98f036ae01fe90ad9d5853918602b705fdd41f02 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sun, 14 Oct 2012 11:32:58 +0700 Subject: A lot of changes. --- web/scripts3.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'web/scripts3.js') diff --git a/web/scripts3.js b/web/scripts3.js index bf3da76f..580546d2 100644 --- a/web/scripts3.js +++ b/web/scripts3.js @@ -39,7 +39,7 @@ function showCommentForm(mid,rid) { var c=$('#replies #'+rid+' .msg-comment'); c.wrap('
'); c.before(''); - c.append(''); + c.append(''); } // $('#replies #'+rid+' .msg-links').hide(); $('#replies #'+rid+' .msg-comment').show(); @@ -63,8 +63,28 @@ function unfoldReply() { } $(document).ready(function() { - $('textarea.reply').autoResize({ + var tareply=$('textarea.reply'); + tareply.autoResize({ extraSpace: 0, minHeight: 1 }); + tareply.click(function () { + $(this).addClass("narrow"); + $(this).after(''); + $(this).off('click'); + }); + + if(!!$('.stickya').offset()) { + var stickyTop = $('.stickya').offset().top; + $(window).scroll(function() { + var windowTop = $(window).scrollTop(); + if (stickyTop < windowTop) { + $('.stickya').css({ + position:'fixed' + }); + } else { + $('.stickya').css('position','absolute'); + } + }); + } }); -- cgit v1.2.3