Can't find the closest label with Jquery

Can't find the closest label with Jquery

I can't find the closest label with Jquery.

I can't find the closest label with Jquery.

The id of the label is different with the id of the input :

<label for="radio-group-1548153603981-other">Other
<input type="text" id="radio-group-1548153603981-other-value" class="other-val user-success" style="display: inline-block;">
</label>

Here my script :

 $(document).delegate( "input[type=text]", "keyup", function() {

    if(this.className == 'other-val'){

        $label = $('label[for="'+ this.id +'"]');

        if ($label.length &gt; 0 ) {
            console.log('ok')
        }
    }
});

Hope someone could help me

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

jQuery ajax get request method example

### jQuery Ajax Get Request Method Example This article is originally published at [https://www.tutsmake.com/jquery-api-ajax-get-method-example/](https://www.tutsmake.com/jquery-api-ajax-get-method-example/...

jQuery Crash Course: jQuery Tutorial Step by Step

jQuery Crash Course: jQuery Tutorial Step by Step