I have some jquery code the creates an quantity text box. Like so
<input type="text" value="1000" class="qty" name="[0].Quantity">
I wish to add some validation to this text box but can hit the method. I believe i need to utlise Live(). But can’t quite figure out how this is implemented.
This is where i’m at
$(document).ready(function () {
$(".qty").change(checkValue);
});
function checkValue() {
alert("on change");
}
The
.live()syntax would look like this:You can test it a bit here, keep in mind this fires on
blurusually though, you may want thekeyup,keydownorkeypressevents rather than change if you’re looking to do it per character.