.change(handler); How to create a personallized handler to add to the .change method
Hello to everyone and sorry for my bad english.
My problem is the following.
I have to use the .change() method for a "select" element:
- $select = $('#idElement");
- $select.change(function() {
- // Some action
- });
What I want to do is to create a stand-alone function in its own right to insert in .change method. Something like:
- $jQuery.fn.myFunction() {
- }
- $select.change(myFunction);
And also I'd like to use the (this) parameter also in myFunction;
How can i do this?
Thank's in advance!