I am new to JQuery
I am writing a simple data validation using JQuery.
Here is the HTML part:
<input type="text" id="testing">
This is the JQuery part:
$(document).ready(function(){
$("#testing").click(function(){
// doing something;
});
$("#testing").change(function(){
// doing something;
});
$("#testing").mouseover(function(){
// doing something;
});
});
$(“#testing”) repeated three times in my sample code, is it possible to simplify this?
I am not sure if bind() can help solve the question.
you could do the following
or (using chains):
with
bindyou can create eg. custom eventhandlers:as reading through the docu, you could also do:
or with jquery 1.4: