Skip to content

Commit

Permalink
Update jquery.tryonline.js
Browse files Browse the repository at this point in the history
  • Loading branch information
gtryonp committed Oct 30, 2013
1 parent 0a322e0 commit 3335b38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jquery.tryonline.js
Expand Up @@ -35,6 +35,7 @@
return false;
};
if (code == 38 || code == 40) {
e.preventDefault();
if(code==38 && mycount>1) mycount--;
if(code==40 && mycount<source.length-1) mycount++;
var buffer = $(this).val().slice(0,$(this)[0].selectionStart) ;
Expand All @@ -46,6 +47,7 @@
$(this).val(source[k][1]);
$("#"+myvar).val(source[k][0]);
$(this)[0].selectionStart=buffer.length;
$(this)[0].selectionEnd=500;
break;
};
};
Expand Down Expand Up @@ -74,6 +76,7 @@
obj.val(source[k][1]);
$("#"+myvar).val(source[k][0]);
obj[0].selectionStart=buffer.length;
$(this)[0].selectionEnd=500;
break;
};
}
Expand Down

0 comments on commit 3335b38

Please sign in to comment.