Changeset 23233 for trunk/themes/elegant/scripts_pp.js
- Timestamp:
- Jun 15, 2013, 6:49:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/elegant/scripts_pp.js
r13730 r23233 156 156 157 157 } 158 158 159 var top = jQuery('#commentAdd').offset().top - parseFloat(jQuery('#commentAdd').css('marginTop').replace(/auto/, 0)); 160 jQuery(window).scroll(function (event) { 161 // what the y position of the scroll is 162 var y = jQuery(this).scrollTop(); 163 164 // whether that's below the form 165 if (y >= top) { 166 // if so, ad the fixed class 167 jQuery('#commentAdd').addClass('fixed'); 168 } else { 169 // otherwise remove it 170 jQuery('#commentAdd').removeClass('fixed'); 171 } 172 }); 173 159 174 160 175 });
Note: See TracChangeset
for help on using the changeset viewer.