How to get id of the clicked element using jquery

Posted by khumlo Freddie in Javascript, jQuery on 06. Aug, 2011 | 0 Comments

When you have situation where there are multiple images and when clicked you want to used the id of the clicked image. So depending on this id you implement different operation on the page. Getting id of the element which triggered an event On HTML page,copy and paste below codes <div class=’images’> <img id="sun" src="image1.jpeg" [...]

Find out ASCII code of any key

Posted by khumlo Freddie in HTML, Javascript on 31. Dec, 2010 | 0 Comments

With just one line of javascript, we can find out the ascii value of any key in the keyboard with some exceptions though. We normally googled to find out what’s the ASCII of some key so as to use in your application. The source code which I will be providing below will do just that, [...]