Modal on load

3 replies · opened Dec 6, 2017

NnikoslavsDec 6, 2017

Hello,
can we set responsive classes on Modal on Load, i.e., need to sex width on different devices?

Also, is there option to dismiss modal on click?

URL www.allegrakrstarenja.com

NnikoslavsDec 10, 2017

Any updates?

SSemicolon WebSTAFFDec 10, 2017

Hello,

  1. This can be best achieved by using a Custom Class on the Modal Content:

	
		
			A Simple Example of a Text Modal
			
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum delectus, tenetur obcaecati porro! Expedita nostrum tempora quia provident perspiciatis inventore, autem eaque, quod explicabo, ipsum, facilis aliquid! Sapiente, possimus quo!

		
		
			[Close this Modal](#)
		
	

and then use the following CSS Code:

.device-lg .custom-modal-width { max-width: 500px; }

.device-md .custom-modal-width { max-width: 400px; }

.device-sm .custom-modal-width { max-width: 300px; }

.device-xs .custom-modal-width { max-width: 200px; }

.device-xxs .custom-modal-width { max-width: 150px; }
  1. This is Definitely Possible. Simply add the closeOnContentClick: true, JS option in the modal: function() Function Block to the $.magnificPopup.open Initialization Code.

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 11, 2017

Thanks, everything works fine

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