Q:

jquery click function

$( "#target" ).click(function() {
  alert( "Handler for .click() called." );
});
23
$('#selector').on('click',function(){
    //Your code here
});                  
21
$( "#dataTable tbody tr" ).on( "click", function() {
  console.log( $( this ).text() );
});
4
function example() {

}
function exampleParams(string, number, bool) {
  
}
//to call a function onclick without passing arguments 
$(selector).click(example);
//to call a function onclick and pass arguments
$(selector).click(function() {
  exampleParams("string example",  3, true);
});
1
$(selector).click();
2
$( "#target" ).click(function() {
  alert( "Handler for .click() called." );
});
-1
$( "#other" ).click(function() {
  $( "#target" ).click();
});
0

$(document).on('click',".any_user_logout",function(){
  signOut()
  window.location.href = '/logout'
})

function signOut() {
    var auth2 = gapi.auth2.getAuthInstance();
    auth2.signOut().then(function () {

    });
  }
-1

New to Communities?

Join the community