events using wp_localize_script and js files