mirror of
https://github.com/Piwigo/piwigo-elegant.git
synced 2026-03-28 17:43:07 +01:00
bug:2923
adding js to fix the "Add acomment" div when scrolling git-svn-id: http://piwigo.org/svn/trunk@23233 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -155,7 +155,22 @@ jQuery("document").ready(function(jQuery){
|
||||
commentsswicther.click(function() { commentsToggle() });
|
||||
|
||||
}
|
||||
|
||||
|
||||
var top = jQuery('#commentAdd').offset().top - parseFloat(jQuery('#commentAdd').css('marginTop').replace(/auto/, 0));
|
||||
jQuery(window).scroll(function (event) {
|
||||
// what the y position of the scroll is
|
||||
var y = jQuery(this).scrollTop();
|
||||
|
||||
// whether that's below the form
|
||||
if (y >= top) {
|
||||
// if so, ad the fixed class
|
||||
jQuery('#commentAdd').addClass('fixed');
|
||||
} else {
|
||||
// otherwise remove it
|
||||
jQuery('#commentAdd').removeClass('fixed');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ a:hover { border-bottom: none;}
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
#commentAdd.fixed { position: fixed; top: 10px; }
|
||||
#pictureCommentList .commentsOrder { float: left; margin-bottom: 5px;}
|
||||
#pictureCommentList .navigationBar { float: right; margin-bottom: 5px;}
|
||||
#pictureComments h4 { margin: 0;}
|
||||
|
||||
Reference in New Issue
Block a user