Scroll to thanks message wordpress
Hello everyone ,
I tried to implement the recommendations of this page but do not work on wordpress .
How can I fix ?
thanks
I tried to implement the recommendations of this page but do not work on wordpress .
How can I fix ?
thanks
Hi Mino,
What exactly did you try to implement ?
Regards,
Max
What exactly did you try to implement ?
Regards,
Max
Hi Max,
I tried this
And add a Load JS action to the form On Submit event with code like this in it:
You can use any id for the div provided that you use the same id in the JavaScript.
but does not work.
Thank you for your attention.
I tried this
User OzNeilAu suggests that you can use JavaScript to have the page scroll to show a form thanks message if the form is not at the top of the page.
You need to add an id to the Thanks Message like this:
<div id='form_thanks_message' >
Thank you . . . // your message goes here
</div>
And add a Load JS action to the form On Submit event with code like this in it:
window.addEvent('domready', function() {
$('form_thanks_message').scrollIntoView();
});
You can use any id for the div provided that you use the same id in the JavaScript.
but does not work.
Thank you for your attention.
v5 uses jQuery, please try:
jQuery(document).ready(function($) {
$('form_thanks_message').scrollIntoView();
});
Sorry for the late reply, the code has a bug, here is a revised version:
jQuery(document).ready(function($){
jQuery('#form_thanks_message')[0].scrollIntoView();
});
This topic is locked and no more replies can be posted.