jquery-tcsc-convert
v1.0.1
Published
jQuery plugin for convert between Traditional Chinese and Simplified Chinese (*Without jQuery is also worked).
Downloads
1
Maintainers
Readme
History
One way solution to convert text between Traditional Chinese and Simplified Chinese in browser. No any dependencies required.
Installation + Use
- Install the npm
npm install jquery-tcsc-convert --save
- Import the script tag after the jQuery
<!-- jQuery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- jQuery extension `jquery-tcsc-convert` -->
<!-- <script src="dist/js/jquery-tcsc-convert.js"></script> -->
<script src="dist/js/jquery-tcsc-convert.min.js"></script>
<script>
$(function () {
$('input').keyup(function ($event) {
console.log($event.originalEvent.key);
$('#tc-result').html(convertSC2TC($(this).val()));
$('#sc-result').html($.tc2sc($(this).val()));
});
});
</script>
Test
npm install -g lite-server
lite-server
License
MIT