Skip to content Skip to sidebar Skip to footer

PgwModal: Using A Trigger Option Duplicates A HTML Markup Of A Content Of A Modal In A Page. How To Get Rid Of Duplication?

I'm trying to use a pgwModal plugin to generate modals. It has an option target: 'target' - The selector (#div or .class) will be used for push its HTML content into the modal.

Solution 1:

Try this:

var html = '<div id="modalContent" style="display: none;"><strong style="color: #ff0000;">Modal Example 2</strong><button type="button" id="sbmt_btn">Submit</button></div>';


$.pgwModal({
    target: '#modalContent',
    title: 'Modal title 2',
    maxWidth: 800,
    content: html
});

You can omit the target if you want.


Post a Comment for "PgwModal: Using A Trigger Option Duplicates A HTML Markup Of A Content Of A Modal In A Page. How To Get Rid Of Duplication?"