Click here to Skip to main content
15,903,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HTML
<div class="table-responsive custom-table">
@if (Model._Approval_Plan_lst != null)
{
    int count = 0;
    foreach (var item in Model._Approval_Plan_lst)
    {
        count++;
        @**@
    }
}

<table id="tblDraftist" class="table table-striped table-bordered table-hover">
<thead>
    <tr><th>Sr.No</th>
        <th>Document No</th>
        <th>Start Date</th>
        <th>End Date</th>
        <th>Estimated Cost</th>
        <th>Requested Amount</th>
        <th>Expected Lead</th>
        <th>Status</th>
        <th>Remarks</th>
        <th>Select</th>
    </tr>
</thead>

<tbody id="tbodyDraftList">
    <tr class="gradeX">
        <td>@count</td>
        <td>@item.DOCUMENT_NO</td>
        <td>@item.START_DATE</td>
        <td>@item.END_DATE</td>
        <td>@item.ESTIMATED_COST</td>
        <td>@item.REQUESTED_AMOUNT</td>
        <td>@item.EXPECTED_LEAD</td>
        <td>@item.STATE_NAME</td>
        <td>@item.REMARKS</td>
        <td>@item.IsStatus</td>
        <td></br></td>
    </tr>
</tbody>
</table>

</div>


What I have tried:

$('#chk_' + Approval_GEN_PLAN_ID +'').click(function () {
});


Above is my Code How to Click on Input type Text Box which is Using Bind Dynamically and I want To Click on Input Type Check box but It is not Call on Click Function


so Please tell me How id Call on Click Function Using Jquery
Posted
Updated 9-Apr-19 1:50am
v3
Comments
#realJSOP 9-Apr-19 7:49am    
I don't see a textbox or the offending javascript in your code snippet.

1 solution

The "click" handler only attaches to elements that exist when the js was run, if you create elements after that you either need to attach the click event to the item you have just created, or use "on" instead which will run for items created after the initial js has run.

.on() | jQuery API Documentation[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900