I am building a mobile application that uses the following technologies
And I want to enable the spelling autocorrect that autmoatically fixes obvious spelling mistakes
such as fixing Teh automatically into The
What kind of a plugin will do the job? Or what should I add in my code?
The HTML5 of my mobile application
<textarea name="textarea-1" id="desiredpart" spellcheck="true" autocorrect="on" ></textarea>
And then in my JavaScript
$( document ).ready(function( ) {
$desiredpart = $("#desiredpart");
$desiredpart.attr("spellcheck","on").attr("autocorrect","on");
});
And my JavaScript is imported after the jQuery mobile file loads.
I read that jQuery mobile disables autocorrect and spellcheck. Should I modify the jQuery mobile source code?
Below is a snippet of the code from http://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.js You can playaround these lines and see the results in various devices.
I would suggest you stick to the HTML attribute option as it has lower overhead on the DOM.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.