Change scroll offset for error box
-
Hi,
I have a fixed header and then the WooCommerce checkout page has a validation error and scrolls to the top where the validation box is show, part of it is hidden behind my header.
Here is what I tried, but didn’t work:jQuery( function( $ ) { $.scroll_to_notices = function( scrollElement ) { if ( scrollElement.length ) { $( 'html, body' ).animate( { scrollTop: ( scrollElement.offset().top - 200 ) }, 1000 ); } }; });
Any suggestions?
Thx.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Change scroll offset for error box’ is closed to new replies.