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 = '<divid="modalContent"style="display: none;"><strongstyle="color: #ff0000;">Modal Example 2</strong><buttontype="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?"