delegates - why not work working
Hello.
I'm trying to understand delegates - and specifically why this doesn't work?
$(document).ready(function () {
$("#loginForm").validate();
bindVirtualKeyboards();
});
function bindVirtualKeyboards() {
$("#loginUserPassword").delegate("virtualKeyboardField", "click", function () { alert("xis"); });
}
and here is the textbox:
<input class="virtualKeyboardField" data-val="true" data-val-required="The User name field is required." id="loginUserName" name="UserName" type="text" value="">
the ideias was to bind some action to when i click in text box.
but doesn't work...
why?
i also try to modify this:
$("#loginUserPassword").delegate("virtualKeyboardField", "click", function () { alert("xis"); });
to
$("#loginUserPassword").delegate("input", "click", function () { alert("xis"); });
never the less, doesn't seems to work.
regards.