JS Playground


How to make div clickable

I saw on some websites, that they don't know how to make div's clickable. So here is a simple solution.

function makeClickable(id){
var elm=document.getElementById(id);
if (elm){
var ahref=elm.getElementsByTagName('a');
for (var j=0;j<ahref.length;j++){
var href=ahref[j].href;
return false;
var every=elm.childNodes;
for (var i=0;i<every.length;i++){
if (document.uniqueID){
window.onload=function init(){
makeClickable('yourId'); //edit here
makeClickable('anotherId'); //another id here

This script will find id in div and make parent div clickable. That is all.

Russian transcriptor

It is already long time from last post. So just quick post. I have made a bookmarklet based on Martin Žantovský Transkriptor founded on web. It is not online already so here is a my bookmarklet version of that script. It is very helpfully on russian forums. In new blogger it seems impossible to add bookmarklet, so you will find it here Transcriptor