Hero Content

Initialize

NkDialog

jQuery Dialog Plugin 1.1.0

Initialized

$('#initialized').on('initialized.NkDialog', function(e, el, opts){
    // ...
}).NkDialog();

$('.nkdialog').NkDialog({
    on : {
        initialized: function(e, el, opts) {
            // ...
        }
    }
});

Destroy

Data Attribute

<div class="nkdialog" data-nkdialog='{"onoff":{"destroy":false}}'></div>

Script

$('.nkdialog').NkDialog({onoff:{destroy:false}});

$('.nkdialog').NkDialog('destroy.NkDialog');

Callback

$('.nkdialog').NkDialog({
    on : {
        callbackName: function(e, el, opts) {
            // ...
        }
    }
});

Options

featurePropertyTypeDefaultDescription
idscontainerstring'nkdialog-container'Dialog popup content id
idswrapperstring'nkdialog-wrapper'sameAs
idssectionstring'nkdialog'sameAs
idsinnerstring'nkdialog-inner'sameAs
idsheaderstring'nkdialog-header'sameAs
idstitlestring'nkdialog-title'sameAs
idscontentstring'nkdialog-content'sameAs
idsfooterstring'nkdialog-footer'sameAs
idsclosestring'nkdialog-close'sameAs
idsbgstring'nkdialog-bg'sameAs
classesskinstring'origin'Add a class to a container tag
classesopenedstring'nkdialog-opened'Add a class to a body tag
classesfixedstring'nkdialog-fixed'sameAs
displayheaderbooleantrueDisplay in the popup content
displaycontentbooleantruesameAs
displayfooterbooleantruesameAs
dataheaderstring''Get data from the element
datacontentstring''sameAs
datafooterstring''sameAs
dataclosestring'<span>close</span>'sameAs
targetheaderstring'.nkdialog-header'Parse html from the target element
targetcontentstring'.nkdialog-content'sameAs
targetfooterstring'.nkdialog-footer'sameAs
targetclosestring'.nkdialog-close'sameAs
ajaxurlstring''Load data from a url
ajaxtargetstring'.nkdialog-content'Load data puts the returned data
ajaxresponsebooleanfalseOutput console
ajaxstatusbooleanfalsesameAs
ajaxxhrbooleanfalsesameAs
bgdisabledbooleanfalse
bgcolorstring'rgba(0,0,0,0.7)'
bgimagestring'''url(path/image.jpg)'
bgstylestring'''property:value;...'
closeoffsetstring'inner''inner', 'outer'
scrollfixedbooleanfalse
animateeffectstring'''', 'fade'
animatedurationnumber300
sizemaxWidthstring'640px'(unit) px, vw
sizemaxHeightstring'50vh'(unit) px, vh
sizefullSizebooleanfalseOverwrite maxWidth and maxHeight
sizefullWidthbooleanfalseOverwrite maxWidth
sizefullHeightbooleanfalseOverwrite maxHeight
onoffdelegatestring'a'Prevents propagation of the same event from being called
onoffpreventDefaultbooleanfalseCancels the event if it is cancelable
onoffclickbooleantrueOccurs when an element is clicked
onoffdestroybooleanfalseDestroys plugin
onoffresizebooleantrueWhen the plugin gets resize
onoffresizedbooleanfalseWhen the plugin gets resized
onofforientationchangebooleanfalseWhen the plugin gets orientationchange
oninitializefunctionnull(parameter) e, el, opts
oninitializedfunctionnull(parameter) e, el, opts
onresizefunctionnull(parameter) e, el, opts
onresizedfunctionnull(parameter) e, el, opts
onorientationchangefunctionnull(parameter) e, el, opts
ondestroyfunctionnull(parameter) e, el, opts
onopenfunctionnull(parameter) e, el, opts
onopenAnimatefunctionnull(parameter) e, el, opts
onopenStepAnimatefunctionnull(parameter) e, el, opts
onopenProgressAnimatefunctionnull(parameter) e, el, opts
onopenCompleteAnimatefunctionnull(parameter) e, el, opts
onopenStartAnimatefunctionnull(parameter) e, el, opts
onopenDoneAnimatefunctionnull(parameter) e, el, opts
onopenFailAnimatefunctionnull(parameter) e, el, opts
onopenAlwaysAnimatefunctionnull(parameter) e, el, opts
onclosefunctionnull(parameter) e, el, opts
oncloseAnimatefunctionnull(parameter) e, el, opts
oncloseStepAnimatefunctionnull(parameter) e, el, opts
oncloseProgressAnimatefunctionnull(parameter) e, el, opts
oncloseCompleteAnimatefunctionnull(parameter) e, el, opts
oncloseStartAnimatefunctionnull(parameter) e, el, opts
oncloseDoneAnimatefunctionnull(parameter) e, el, opts
oncloseFailAnimatefunctionnull(parameter) e, el, opts
oncloseAlwaysAnimatefunctionnull(parameter) e, el, opts