|
|
|
@ -113,3 +113,22 @@
|
|
|
|
|
ev.preventDefault();
|
|
|
|
|
ev.stopPropagation();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*============================================================================*/
|
|
|
|
|
/* Select a text range into within a textArea */
|
|
|
|
|
/*============================================================================*/
|
|
|
|
|
$.fn.selectRange = function(start, end) {
|
|
|
|
|
return this.each(function() {
|
|
|
|
|
if(this.setSelectionRange) {
|
|
|
|
|
this.focus();
|
|
|
|
|
this.setSelectionRange(start, end);
|
|
|
|
|
} else if(this.createTextRange) {
|
|
|
|
|
var range = this.createTextRange();
|
|
|
|
|
range.collapse(true);
|
|
|
|
|
range.moveEnd('character', end);
|
|
|
|
|
range.moveStart('character', start);
|
|
|
|
|
range.select();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|