Changeset 26086
- Timestamp:
- Dec 22, 2013, 5:31:56 PM (10 years ago)
- Location:
- trunk/themes/elegant
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/elegant/scripts_pp.js
r26084 r26086 54 54 function commentsToggle() { 55 55 if (comments.hasClass("commentshidden")) { 56 57 58 56 comments.removeClass("commentshidden").addClass("commentsshown"); 57 comments_button.addClass("comments_toggle_off").removeClass("comments_toggle_on");; 58 session_storage['comments'] = 'visible'; 59 59 60 comments_top_offset = comments_add.offset().top - parseFloat(comments_add.css('marginTop').replace(/auto/, 0)); 61 } 62 else { 63 comments.addClass("commentshidden").removeClass("commentsshown"); 64 comments_button.addClass("comments_toggle_on").removeClass("comments_toggle_off");; 65 session_storage['comments'] = 'hidden'; 66 } 60 comments_top_offset = comments_add.offset().top - parseFloat(comments_add.css('marginTop').replace(/auto/, 0)); 61 } 62 else { 63 comments.addClass("commentshidden").removeClass("commentsshown"); 64 comments_button.addClass("comments_toggle_on").removeClass("comments_toggle_off");; 65 session_storage['comments'] = 'hidden'; 66 comments_top_offset = 0; 67 } 67 68 } 68 69 … … 144 145 if (comments_top_offset==0) return; 145 146 146 // what the y position of the scroll is147 147 var y = jQuery(this).scrollTop(); 148 148 149 // whether that's below the form150 149 if (y >= comments_top_offset) { 151 // if so, ad the fixed class 152 comments_add.addClass('fixed'); 150 comments_add.css({ 151 'position': 'absolute', 152 'top': y-comments.offset().top+10 153 }); 153 154 } 154 155 else { 155 // otherwise remove it 156 comments_add.removeClass('fixed'); 156 comments_add.css({ 157 'position': 'static', 158 'top': 0 159 }); 157 160 } 158 161 }); -
trunk/themes/elegant/theme.css
r24881 r26086 238 238 /* image comments */ 239 239 240 #thePicturePage #comments { padding: 2px 5px; }240 #thePicturePage #comments { padding: 2px 5px; position:relative;} 241 241 #thePicturePage #comments h3 { margin: 10px 0;} 242 242 #thePicturePage #comments form { margin: 10px 0;} … … 256 256 font-size: 100%; 257 257 } 258 #commentAdd.fixed { position: fixed; top: 10px; }259 258 #pictureCommentList .commentsOrder { float: left; margin-bottom: 5px;} 260 259 #pictureCommentList .navigationBar { float: right; margin-bottom: 5px;}
Note: See TracChangeset
for help on using the changeset viewer.