forked from hummypkg/webif
aadac18796
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@753 2a923420-c742-0410-a762-8d5b09965624
24 lines
466 B
JavaScript
24 lines
466 B
JavaScript
(function($)
|
|
{
|
|
$.fn.tabsupport = function()
|
|
{
|
|
return this.each(function() {
|
|
$(this).keydown(function(e) {
|
|
if (e.keyCode == 9)
|
|
{
|
|
var el = $(this).get(0);
|
|
var start = el.selectionStart;
|
|
var end = el.selectionEnd;
|
|
$(this).val(
|
|
$(this).val().substring(0, start) +
|
|
"\t" +
|
|
$(this).val().substring(end)
|
|
);
|
|
el.selectionStart = el.selectionEnd = start + 1;
|
|
return false;
|
|
}
|
|
});
|
|
});
|
|
}
|
|
})(jQuery);
|