Modal on Scroll

14 replies · opened Nov 9, 2018

NnikoslavsNov 9, 2018

Hello,
I need to setup modal on scroll instead modal on load, but cannot do it exactly how I followed other topics on forum.

Please check URL: https://www.allegrakrstarenja.com/en/index.html

We setup modal on load, can you also help with cookie enabled modal, how to make that work?

So to sum up, we need modal on scroll with cookie enabled?

Kindly

NnikoslavsNov 9, 2018

Also, how to modal close on submit?

SSemicolon WebSTAFFNov 12, 2018

Hello,

You can simply call the following JS Code on Form Submit:

$.magnificPopup.close();

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.

NnikoslavsNov 19, 2018

and can you please help me with my main question?

how to setup modal on scroll, not on load?

SSemicolon WebSTAFFNov 21, 2018

Hello,

Unfortunately, this feature is currently not supported and will require customization. We will try introducing it in Our Future Updates.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

NnikoslavsNov 21, 2018

Thank you for your reply, but on forum I found that you helped other people with this workaround:
http://support.semicolonweb.com/forums/topic/how-to-open-modal-on-scroll-instead-of-modal-on-load/
http://support.semicolonweb.com/forums/topic/modal-launch-automatically-when-scrolled-to-a-specific-point-in-the-web-page/

Just let me know if this is not supported now, so I don'n bother with it very much?

Also, what about cookie enabled modal? Can you test mine, is everything working properly?

Kindly

SSemicolon WebSTAFFNov 23, 2018

Hello,

Thank You so much for your Continued Patience with this! :)

Yes we have provided with some experimental examples in the past for this feature but we currently do not provide any explicit support for this feature because it is out of scope of the current available features in Canvas. You can consider using the examples above and should you face any errors, you can provide us with a Live URL and we will definitely look into this and provide you with more assistance. But until this feature is completely incorporated in the core codes of Canvas, we will not be able to provide any dedicated support on this. Hope you understand.

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

NnikoslavsNov 23, 2018

Thank you very much for your detailed response.

Can you help me with second part of mine question, how to set that form doesn't show again, your example of COOKIE ENABLED MODAL?

Thank you

SSemicolon WebSTAFFNov 24, 2018

Hello,

Thank You so much for your Understanding! :)

  1. You can consider using a Button inside the Modal with an onclick Attribute to set the Cookie while closing the Modal:
onclick="jQuery.magnificPopup.close();Cookies.set( 'disable-modal', '1' );return false;"
  1. And then use Javascript if/else Block to check the Cookie before opening the Modal:
if( Cookies.get('disable-cookie') != 1 ) {
	jQuery('#myModal1-trigger').magnificPopup('open');
}

This should definitely work fine. Hope this Helps!

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

NnikoslavsNov 29, 2018

Hello Team,
thank you for your reply.
Cause I am using on-load modal, where should I use if/else block?

LIVE url: https://www.allegrakrstarenja.com/index.html

Kindly

PS: This is my trigger
``

And my modal


						
							
								
								
									
									
										
											Želite na krstarenje?
											
Pošaljite nam upit i odgovorićemo Vam u najkraćem mogućem roku.

										
										
											
											
											
											
											
											
											Pošalji
										
										

									
_[Ne prikazuj više ovu formu](#)_

									
									
								

							
						
					
SSemicolon WebSTAFFDec 2, 2018

Hello,

The Default .modal-on-load's Enable Cookie feature has a minor bug. Simply find the following code in the js/functions.js File:

var elementCookie = Cookies.set( elementTargetValue );

and replace it with:

var elementCookie = Cookies.get( elementTargetValue );

This will definitely fix the issue with Cookie Modals. Hope this Helps!

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

NnikoslavsDec 3, 2018

Thank you, it really does the trick.

What is default value of cookie duration, and how I can modify it?

Kindly

SSemicolon WebSTAFFDec 9, 2018

Hello,

The Default Value is Unlimited. You can find the following code:

Cookies.set( elementTargetValue, '0' );

and replace it with:

Cookies.set( elementTargetValue, '0', { expires: 7 } );

to make the Cookie expire after 7 Days.

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.

NnikoslavsDec 13, 2018

Hello,
can you check once again url www.allegrakrstarenja.com
Because, now form is not opening, but magnific popup still triggers

Screenshot supplied

SSemicolon WebSTAFFDec 14, 2018

Hello,

We have checked out your Website and the Modal appears to be working fine for us! Please let us know if you are facing any further issues with this.

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