Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function changeUser() {
- var value = $('#users').val();
- $('#info').html('');
- $('#list').each( function(index) {
- act = $(this).text().split(" ");
- for ( var i in act ) {
- tmp = act[i];
- if( tmp.indexOf( value ) > 1 ) {
- tmp = $('#info').html() + tmp;
- $('#info').html( tmp );
- }
- }
- });
- pressed=0;
- }
- function changeUserS() {
- if(!pressed) {
- pressed=1;
- }
- else {
- clearTimeout(timeout);
- }
- timeout=setTimeout(changeUser(),300);
- }
- $('#users').keypress(changeUserS);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement