7
|
1 function setFocus(caller) {
|
|
2
|
|
3 var aa = this;
|
|
4 var rs = $("a[id*=':out:0:selectItem']");
|
|
5 if (rs.length > 0) {
|
|
6 var firstItem = rs.get(0);
|
|
7 var divSuggestion = firstItem.children[0];
|
|
8 if(divSuggestion){
|
|
9 divSuggestion.style.backgroundColor = '#2A6CC2';
|
|
10 caller.blur();
|
|
11 divSuggestion.focus();
|
|
12
|
|
13 }
|
|
14 /*
|
|
15 var element = firstItem.childNodes.item("suggestionItem");
|
|
16 element.focus();
|
|
17 alert("setFocus!");
|
|
18 */
|
|
19
|
|
20 }
|
|
21
|
|
22 }
|
|
23 /*
|
|
24 $( "div" ).focus(function() {
|
|
25 alert($( this ).className);
|
|
26 });*/ |