/ Published in: JavaScript
                    
                                        
Can use without jquery
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
/* to the END */
$('textarea').each(function(){ //change event or something you want
/* simple js */
if (this.createTextRange) {
var r = this.createTextRange();
r.collapse(false);
r.select();
}
$(this).focus(); //set focus
});
/* to the BEGIN */
$('textarea').each(function(){ //change event or something you want
/* simple js */
if (this.createTextRange) {
var r = this.createTextRange();
r.collapse(true);
r.select();
}
$(this).focus(); //set focus
});
Comments
 Subscribe to comments
                    Subscribe to comments
                
                