$(document).on('pagebeforeshow', '#index', function(){
$(document).on('click', '#testButton', function(){
alert('Alerted!');
});
$(document).on('click', '#goButton', function(){
alert('Button Pressed');
});
$(document).on('keypress', '#textB, #textA', function(evt){
var keyPressed = evt.which || evt.keyCode;
//alert(keyPressed);
if (keyPressed == 13) {
document.getElementById('goButton').click();
evt.cancel = true;
} else
{
return AmharicPhoneticKeyPress(evt,this);
}
});
});
// Copyright: (c) 2009 by SelamSoft Inc.
// Product title: Amharic Phonetic Typing Javascript
// Product version details: 2.1.0, 01-28-2009 Updated and tested on IE, Firefox, Opera, Safari and Google Chrome
// Product URL: http://www.amharicdictionary.com/js/amharictyping.js
// Contact info: [email protected]
// Notes: You are free to use this script on your website with the requirement that you
// link to www.AmharicDictionary.com on your site's front page.
// Feel free to copy, use and change this script as long as this head part remains unchanged.
// If you improve on this script, please send us your updates.
function getCursorPosition() {
var range;
range = document.selection.createRange();
range.moveStart("Textedit", -1);
return range.text.length;
};
function isRootLetter(amharicValue) {
var isRoot = false;
switch (amharicValue) {
case 4629:
case 4677:
case 4741:
case 4797:
case 4813:
case 4653:k
case 4845:
case 4725:
case 4901:
case 4949:
case 4661:
case 4853:
case 4941:
case 4821:
case 4877:
case 4613:
case 4869:
case 4781:
case 4621:
case 4829:
case 4933:
case 4733:
case 4717:
case 4709:
case 4765:
case 4757:
case 4637:
case 4909:
case 4637:
case 4917:
case 4669:
case...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.