njum fix
This commit is contained in:
25
public/njum/js/newscript.js
Executable file → Normal file
25
public/njum/js/newscript.js
Executable file → Normal file
@@ -231,9 +231,9 @@ $('#togglebg').on('click', function (e) {
|
||||
background = !background;
|
||||
localStorage.setItem('background', background.toString());
|
||||
if(background)
|
||||
$(canvas).css('display', 'block');
|
||||
$(canvas).addClass( 'fader-in' ).removeClass('fader-out');
|
||||
else
|
||||
$(canvas).css('display', 'none');
|
||||
$(canvas).addClass( 'fader-out' ).removeClass('fader-in');
|
||||
animationLoop();
|
||||
});
|
||||
|
||||
@@ -1170,6 +1170,7 @@ $(function ($) {
|
||||
comment.closest('.panel-footer').siblings('.panel-body').find('.comment_clickable_timestamp').on('click', commentClickableTimestamp);
|
||||
var textarea = commentform.find('textarea').val('');
|
||||
textarea.blur();
|
||||
comment.animate({ scrollTop: $(document).height() }, 1000);
|
||||
}).fail(function(){
|
||||
flash('error', 'Error saving comment');
|
||||
});
|
||||
@@ -1357,4 +1358,24 @@ $window.on('scroll', function() {
|
||||
$videoWrap.height('auto');
|
||||
$video.removeClass('stuck');
|
||||
}
|
||||
});
|
||||
function bottomArrow() {
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
}
|
||||
|
||||
function commentBotScroll() {
|
||||
setTimeout(window.scrollTo(0,document.body.scrollHeight), 5000);
|
||||
};
|
||||
|
||||
$(window).scroll(function(){
|
||||
if ($(this).scrollTop() > 0) {
|
||||
$('.scrollToTop').fadeIn().css('display', 'inline-block');;
|
||||
} else {
|
||||
$('.scrollToTop').fadeOut().css('display', 'inline-block');;
|
||||
}
|
||||
});
|
||||
|
||||
$('.scrollToTop').click(function(){
|
||||
$('html, body').animate({scrollTop : 0},800);
|
||||
return false;
|
||||
});
|
Reference in New Issue
Block a user