JSFiddle - React, Tailwind, and code Playground

by vijayweb

HTML

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="http://funmix.vijayweb.com/jsfiles/jsapi.js">
    </script>
<script type="text/javascript">

// Load the Google Transliterate API
      google.load("elements", "1", {
            packages: "transliteration"
          });


$(function() {
$(".changelanghi").click(function() {
$("#addtext").remove();

$.ajax({
            type: "POST",
  url: "hi.php",

  cache: false,
  success: function(html){
  $("#update").prepend(html);

 }
 });



});
});


$(function() {
$(".changelangte").click(function() {
$("#addtext").remove();
$.ajax({
            type: "POST",
  url: "te.php",

  cache: false,
  success: function(html){
  $("#update").prepend(html);

 }
 });


});
});

$(function() {
$(".changelangta").click(function() {
$("#addtext").remove();
$.ajax({
            type: "POST",
  url: "ta.php",
  cache: false,
  success: function(html){
  $("#update").prepend(html);

 }
 });


});
});
</script>

                <div id="update"><input type="text" id="addtext" name="text" value=""/><br></div>

<a  val="te" class="changelangte" href="#">Telugu</a>
<a  val="ta" class="changelangta" href="#">Tamil</a>
<a  val="hi" class="changelanghi" href="#">Hindi</a>

CSS

<script type="text/javascript">

// Load the Google Transliterate API
      google.load("elements", "1", {
            packages: "transliteration"
          });


 

var options = {
    sourceLanguage: 'en',
    destinationLanguage: 'te',
    shortcutKey: 'ctrl+g',
    transliterationEnabled: true
        };

  // Create an instance on TransliterationControl with the required
        // options.
        var control =
            new google.elements.transliteration.TransliterationControl(options);
// Enable transliteration in the textbox with id
        // 'transliterateTextarea'.
        control.makeTransliteratable(['addtext']);
</script>
<input type="text" id="addtext" name="text" value=""/>