New to Kendo UI for jQuery? Download free 30-day trial

Focus Widget on Label Click

The following example demonstrates how to focus the NumericTextBox when the label element is clicked.

<label for="numerictextbox">Number: </label>
<input id="numerictextbox" />
  $(function() {

    //global click handler for all label elements
    $("label").click(function(e) {
       var label = $(this);
       var id = label.attr("for");
       var widget;

       if (id) {
           widget = kendo.widgetInstance($("#" + id), kendo.ui);

           if (widget) {

See Also

For more runnable examples on the Kendo UI NumericTextBox, browse its How To documentation folder.

In this article
Not finding the help you need? Improve this article