Trigerring in cq:dialog

Karl515

19-02-2019

Can I trigger this clear button

1695294_pastedImage_0.png

using javascript that has a category of cq.authoring.dialog?
I'm trying to achieve something like
$(document).on("click","slide2", function (e) {

     // tab3 file clear triggered.

})

So when I click my slide 3 again, it sould be empty.

Accepted Solutions (1)

Accepted Solutions (1)

Karl515

19-02-2019

Thanks but I was looking for this.

$(document).on("foundation-contentloaded", function (e) {

     $tar = $(".cq-dialog-file-upload", e.target);

     $($tar.closest('coral-fileupload').find('button')[1]).trigger("click")

}

It works but tell me if I'm doing something wrong.