how to change values of a dropdown on key press using jquery -
i need change values of "focused" dropdown on keypress using jquery.
i need,
- how foucsed drop down or how can check whether drop down has focus.
- how change drop down values in key press 1,2,3 etc. using jquery.
thanks in advance.
to see if object selected:
if($(".foo").is(':focus')){ // }
to change values on keypress:
$(".foo").bind("keypress", function(e){ $(this).attr('value', 'bar'); })
though not sure mean changing values of drop down, or why you'd want that.
Comments
Post a Comment