By 10/02/2016 6 Comments

Auto detect input writing position in JQuery

  • When we write right to left  language characters in textarea the direction of the writing will automatically be changed from right to left and vice versa.

Example: JQuery

<script src=""></script><script>
$(document).ready(function() {
 $("#txt_post_contents").on("mousemove mouseleave keyup", function () {
 var post_contents = $.trim(document.getElementById("txt_post_contents").value);
 if(post_contents.length == 1||post_contents.length == 2){
 var langType = new RegExp("[\x00-\x80]+");
 var AsciiPostContents = langType.test(post_contents);

Example: Html

<textarea id="txt_post_contents" name="txt_post_contents" rows="3"></textarea>

Posted in: HTML, jQuery, Solutions

Leave your valuable Comment

Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .