Modal launch automatically when scrolled to a specific point in the web page

2 replies · opened Jan 31, 2017

KksbaskarJan 31, 2017

Hello!

I have two questions

  1. Is it possible to make a modal launch automatically when the user has scrolled up to a point in the page instead of launching on page load? The extension of the question is "is it possible to launch the modal when the user is moving out of the site"?

  2. Is it possible to set the cookie bar for specific regions based on the ip of the user instead of showing it for everyone?

Thanks

K S Baskar

KksbaskarFeb 3, 2017

Hello!

Not sure if you got the questions that I posted 3 days ago. I have repeated the questions below for quick reference.

I have two questions

  1. Is it possible to make a modal launch automatically when the user has scrolled up to a point in the page instead of launching on page load? The extension of the question is “is it possible to launch the modal when the user is moving out of the site”?

  2. Is it possible to set the cookie bar for specific regions based on the ip of the user instead of showing it for everyone?

Thanks

K S Baskar

SSemicolon WebSTAFFFeb 4, 2017

Hello,

We Really Apologize about the Delays caused and Appreciate your Patience! :)

  1. This is Definitely Possible! You can consider using the following JS Code to detect the Scroll Position only when the User is scrolling down:

	jQuery(document).on( 'ready', function (event) {

		var lastScrollTop = 0;
		$(window).scroll(function(event){
			var st = $(this).scrollTop();
			if (st > lastScrollTop){
				var scroll = $(window).scrollTop();

				if( scroll >= 200 ) {
					// Trigger Modal
				}
			} else {
				// upscroll code
			}
			lastScrollTop = st;
		});
	});

Please let us know which Modal you are planning to use so that we can provide you with the Accurate Code for the Modal you are trying to use!

  1. This is Possible but you will need to use a GeoLocation API Service like this: https://freegeoip.net/ .

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