Modal PopOvers: Opening from javascript function

2 replies · opened Jul 14, 2016

PPavelRomeroJul 14, 2016

Hi:

I’m using first sample from: \HTML\modal-popovers.html

Is it possible open and close Modal Window from javascript function ? Your sample open and close Modals using data-toggle='modal' data-target='#MyModalSample'. I need to have control over this window.

Please your help, thanks.

Regards
Pavel Romero

PPavelRomeroJul 14, 2016

Some answer for my question ?

Regards
Pavel Romero

SSemicolon WebSTAFFJul 15, 2016

Hello,

Apologize about the Delay in replying to your Support Query.

The Modal Functionality used here is from Bootstrap: http://getbootstrap.com/javascript/#modals-methods . So you can simply use the following JS code to Open a Specific Modal using its ID:

jQuery('#myModal').modal('show');

and the following JS Code to the close the Modal:

jQuery('#myModal').modal('hide');

This will definitely work fine. 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