Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Zoho Docs
Google Docs
Each Attachment size should not exceed 1MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
damz101
damz101's Profile
1
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
Autocomplete pageup/pagedown key events
[3Replies]
18-Feb-2013 09:55 AM
Forum:
Using jQuery UI
I have an autosuggest feature where i want to enable key functionality to scroll up and down through the dropdown list. heres my code
$(document).ready(function() {
$('.dropdown').hide();
$('.autosuggest').keyup(function (e) {
isDelete = false;
// if delete or backspace were pressed,
// less than 3 characters also trigger suggestion
if( e.which == 8 || e.which == 46) {
isDelete = true;;
}
var search_term = $(this).attr('value');
if(
search_term.length == 0 ||
(search_term.length < 1 && isDelete == false)
) {
$('.dropdown').hide();
} else {
$('.dropdown').show();
}
if(search_term.length >= 1 || isDelete == true) {
var category=$('#category').attr('value');
var conditions = {
'search_term' : search_term,
'category' : category
};
$.post('ajax/searchApp.php', conditions, function(data) {
$('.result').html(data);
$('.result li').click(function() {
var result_value=$(this).text();
$('.autosuggest').attr('value',result_value);
//alert(result_value);
$('.result').html('');
});
});
};
});
$('result').keydown(function(e){
if (e.keyCode == 38) {
$(this).prev().focus();
}else if (e.keyCode == 40) {
$(this).next().focus();
}
});
});
«Prev
Next »
Moderate user : damz101
Forum