Feedback form visible when page is scrolled almost to the end

1 reply · opened Oct 10, 2021

CCarlosOct 10, 2021

I would like to have a feeback form (like forms-feedback-fixed.html), but I want it to appear only when the visitor scrolls the page down at last up to 80% of the content (or of course if the full page fits in the screen so there is no scrolling need).

Ie: if it is a long article, I want the visitor to give feedback only after he have read at last 80% of the content.

Another possibility would be to the feedback form to appear when some specific page "invisible-element" (kind of mark) inserted after the end of the article becomes "visible" to the user.

Is that possible?

SSemicolon WebSTAFFOct 11, 2021

Hello,

This is Possible but requires Customization. You can consider using the following JS code at the bottom of the Page:
[ch_pre type="js"]var dHeight = $(document).height(),
wHeight = $(window).height(),
feedbackForm = $('.fixed-feedback');

$(window).on('scroll', function(){
var sTop = $(window).scrollTop();

var scrollPercent = ( sTop / ( dHeight - wHeight ) ) * 100;

if( scrollPercent > 80 ) {
	feedbackForm.removeClass( 'd-none' );
} else {
	feedbackForm.addClass( 'd-none' );
}

});[/ch_pre]

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard