Wednesday, January 28, 2015

call or invoke onclick event function by javascript

var elem = document.getElementById("image_id");
if (typeof elem.onclick == "function") {
elem.onclick.apply(elem);
}

No comments:

Post a Comment

Workflow of WordPress project in a team with Git

1. We should not push any Wordpress core folders or files to github. 2. Only push custom theme and custom plugin into github. 3. So, in this...