Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find which jQuery event is being called when I click a textbox?

I've inherited a piece of software and in it is a form where I cannot figure out where the click event is in jQuery.

When the user clicks in a textbox on the form, the checkbox next to it toggles using a jquery call that I cannot seem to find. I've searched the associates .js files and for the life of me I cannot find it.

Are there any tools, tips or tricks I can use to find what is being called to trigger the click event, so that I can alter/deactivate it?

Below is a sample of the markup around the form:

<li>
    <input type="checkbox" name="checkbox_other1" id="checkbox_other1" value="checkbox_other1" />
    <label for="checkbox_other1">Other <input type="text" id="textfield_other1" name="textfield_other1" size="35" maxlength="35">.</label>
</li>
<li>
    <input type="checkbox" name="checkbox_other2" id="checkbox_other2" value="checkbox_other2" />
    <label for="checkbox_other2">Other <label for="checkbox_other2">
        <input type="text" id="textfield_other2" name="textfield_other2" size="35" maxlength="35">.
    </label>
</li>

Thanks.

SOLUTION So it seems I was thinking too high level. It wasn't jquery/javascript that was causing the issue, but it was the label tags that was attaching the textfield to the checkbox. Thanks for all the assistance.

like image 553
JustJon Avatar asked Nov 03 '22 21:11

JustJon


1 Answers

Visual Event is very handy tool to find events on webpage.

You can bookmark it and then use on any webpage.

Also available as chrome extension.

like image 176
Gurpreet Singh Avatar answered Nov 09 '22 08:11

Gurpreet Singh