You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

I am using oj-dialog box , on close (x) icon I want to trigger an event but I am not able to capture

edited Nov 1, 2019 5:02AM in Visual Builder 6 comments

Content

PFB the oj-dialog code

 

<oj-dialog style="display:none" id="modalDialog1" dialog-title="Modal Dialog">
              <div slot="body">
                The dialog window can be moved, resized and closed with the 'x' icon.
                Arbitrary content can be added to the the body and footer sections.
              </div>
              <div slot="footer">
                <oj-button id="okButton" on-oj-action="[[close]]">OK
                </oj-button>
              </div>
            </oj-dialog>

I want to link custom event for close icon , class:oj-dialog-header-close-wrapper , but not sure why the binding is not possible on internal classes and id's of oj-dialog box.

I am using below code to link.

 

$( ".oj-dialog-header-close-wrapper" ).bind( "click", function() {

  alert( "User clicked on 'foo.'" );

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!