Question

I m closing messi pop -up using "$('.messi').remove();" . But as the modal was set true in the pop-up , after removing the pop-up also modal is present and because of this , I m unable to make any change in the web page . How to set modal:false manually?? http://marcosesperon.es/apps/messi/

function new_header()
{
    var content = "<form class='format_form'   action='javascript:void(0);'>";
    content += "<fieldset>Name:<input type='text' id='User' name='Name'>  </fieldset>";
    content += "<button class='submit button'id='subMitBtn' type='button' name='submit' >Login</button></form>";
    new Messi(content, {title: "Enter Your Name", center: false,
                    viewport: {top: '300px', left: '600px'},closeButton:false, modal: true, width: '250px'});
}

I'm using the above function to bring the messi pop-up and the following is the jquery written for the submit button click.

//$("#subMitBtn").click(function() {
  //          User = $("#User").val();
  //          log( User );
    //        $('.messi').remove();
            $('.messi #subMitBtn')[0].click();
      //      makeTableEditable();
      // });

How can I proceed to remove the modal effect. Now , I m doing like this but still unable to remove the modal effect.

Was it helpful?

Solution

Messi doesn't have a publicly available API for this kind of thing (as far as I'm aware), but you can fake a click on the close (or OK buttons) like this:

If you have shown the close button:

$(".messi-closebtn")[0].click();

Or if you don't have a close button, trigger the click on whichever custom button you need:

$(".messi .btn")[0].click();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top