jQuery Magnific Popup and .on -


I am currently using MagnificPopup for an "edit" form. What does this form allow the user to edit a line after the user completes editing, it changes that content with updated content.

Within that updated content, there is an "edit" button that will bring the edit form back.

The problem I am running is that after editing an object, after clicking on the edit button on the same item, this form is not being opened because "edit now" link Now there is dynamic content.

Here I am referring to the code, which opens the popup:

  $ ('.jpg-popup'). MagnificPopup ({type: 'ajax'});   

Is it the place to use .on , so that it works properly? Some with these lines:

  $ (document) .on ('magnificPopup', '.imple-ajax-popup', function (e) {type: 'ajax'});   

I can not seem to figure it out.

The closest in the document is this bit of code, which is a bit unclear to me:

  $ ('.image-link'). ('MfpOpen', function (e / *, params * /) {console.log ('popup opened', $ .magnificPopup.instance);});    

understand it!

  $ (document). ('Click', '.simple-ajax-popup', function (e) {e.preventDefault (); $ .magnificPopup.open ({items: {src: $ (this) .attr ('href')} , Type: 'ajax'});});    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -