how to call jquery selector from outside kendo window?

461 Views Asked by At

I have kendo window with this following code, then how can I select jquery ID: btnValidateConfirmPin from outside kendo window? I also tried with $(document).on("click" it work but i don't know how to call $(this) in this event, any methods that could call selector directly from kendo window?

// Kendo Window ...

@Html.AntiForgeryToken()//Art add [2017-07-13]
<div class="formarea">
    <span class="h3-left"></span><h3 class="fixed-h3">@SharedResource.ConfrimPinHeader</h3><span class="h3-right"></span>
    <br />
    <div> ... </div>
    <div>
        <!-- this button -->
        <button id="btnValidateConfirmPin" class="button green" type="submit">@SharedResource.ContinueBotton</button>
    </div>
</div>

...

//outside kendo

$("#btnValidateConfirmPins").click(function (e) { //not work });

$(document).on("click","##btnValidateConfirmPins",function() { //work but how to call $(this)});
1

There are 1 best solutions below

4
Richárd Baldauf On

If I understand it correctly, you would like to use the kendoWindow inside the #btnValidateConfirmPins method call.

You can use the kendoWindow ID to get that and call the data("kendoWindow") function. Example: $("#YourKendoWindowID").data("kendoWindow")

P.S.: The document click method has double # mark.