Modal Forms not working from JS

1 reply · opened Oct 23, 2018

VvojjinOct 23, 2018

Before the question, I have just extended support and I bought two licenses, just wondering why I do not have access to other questions?

Well, first problem I have is modal form. I need to create simple alerts which are not shown by a click, than by code. I have copied simple modal window at the end of the code:


	
		
			
				Modal Heading
				×
			
			
				
					

				
				
					OK
				
			
		
	

and when I need to display it from js i run the code:

static simpleAlert(cBody){
	$("#aleeeertMsg").text(cBody);
	$.magnificPopup.open({
		items:{src: "#aleeeert"},
		mainClass: 'mfp-no-margins mfp-fade',
		type: 'inline',
		closeBtnInside: true,
		fixedContentPos: true,
		removalDelay: 500
	}, 0);
}

only transparent black screen shows, and window is hidden somewhere in the back...

Second, portfolio masonry images not displaying correctly in tabbed div. they re-arrange when window is resized but not initially. Also, tab where are they displayed is initially hidden (not the first one tab)

Regards,
Vojin

SSemicolon WebSTAFFOct 27, 2018

Hello,

The Codes you are using is incorrect! You are using the Bootstrap Modal, however, the Javascript is for the Magnific Popup Lightbox. For the proper Javascript Codes, please use this guide: http://getbootstrap.com/docs/4.1/components/modal/#via-javascript .

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