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

Wordpress debug log function

Wordpress error log code: if ( ! function_exists ( 'write_log' ) ) { function write_log ( $data ) { if ( defined ( '...