Reputation: 21661
How to select a button whose id contains a certain string? The reason I'm asking that is asp.net webform is adding the name of the container to the element's id.
$(document).ready(function () {
$('input[submit]:addNewRow').click(function(){
//Do someting...
});
});
The id
of the button contains AddNewRow
.
Thanks for helping
Upvotes: 1
Views: 2766
Reputation: 437754
Use the attribute value contains selector. If the id
contains "AddNewRow", that would be
$("[id*='AddNewRow']")
Upvotes: 4