|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
jQuery and several events I recently began to use the jQuery framework. But this morning I encountered a problem. I do not know how to run a function on multiple events. In my form I would like to make a function on a click in a select or keyup on an input text. To solve my problem I went through a function and I call this function on my click and select onkeyup input in my area. I wonder if it is possible to avoid these function calls in the html code with jquery? Code which is not OK. My code does not fire on the keyup event as I would like keyup on id_coclico and click on the country id. PHP Code: Code is ok but not really what I want because I have to call a function in my form: PHP Code: |
#2
| |||
| |||
Re: jQuery and several events I didn't understood what you want. In your second code, are not events that's normal? Why do you not put something like: PHP Code:
__________________ Grand Theft Auto 4 PC Video Game |
#3
| |||
| |||
Re: jQuery and several events The second code I call with onClick = "test_client ()" and onkeyup = "test_client ()" in my form and I would like to avoid this up as jQuery allows to pass. And I tried your solution and it works well. On the other side, there is no function in jQuery which allows the simultaneous events? PHP Code: |
#4
| |||
| |||
Re: jQuery and several events What do you mean by "simultaneous events"? It works the same way as what you put, but it's more readable: PHP Code:
__________________ Grand Theft Auto 4 PC Video Game |
![]() |
|
Tags: jquery |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Updates with jQuery 1.6.1 | Vincent D | Software Development | 5 | 23-06-2011 10:17 PM |
New features in jQuery 1.4.3 | Botan | Software Development | 6 | 03-12-2010 06:43 AM |
Read XML and RSS with jQuery | Ground 0 | Software Development | 3 | 27-11-2010 06:18 AM |
Jquery or Perl | CLONE | Software Development | 1 | 13-05-2010 01:30 AM |
Manipulate jQuery with PHP | Zecho | Software Development | 5 | 16-06-2009 02:14 AM |