Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery click function

$( "#target" ).click(function() {
  alert( "Handler for .click() called." );
});
Comment

jquery on click function

//1st way
$(".searchCategory").click(function () {
  //your code here
});

//2nd way
$(".searchCategory").on( "click",getCategory);	// getCategory is a function but don't need the pharenthesis
//if you write getCategory() instead of getCategory when getCategory is a function with no pharamenters it might not work
Comment

jquery .click function call

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);
});
Comment

jquery code to make click function

<script>
        $(document).ready(function() {
            $("p").click();
        });
    </script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: How to fetch API data using POST and GET in PHP 
Javascript :: formik react native 
Javascript :: percentage formula in javascript 
Javascript :: updateone mongoose example 
Javascript :: js create array from for loop 
Javascript :: export data to excel using react js 
Javascript :: csv to json python 
Javascript :: find a single element in array of objects javascript 
Javascript :: sticky footer react 
Javascript :: ionic react use yarn 
Javascript :: new date parameters javascript 
Javascript :: remove specific element from array javascript 
Javascript :: split 2 arrays javascript 
Javascript :: query string from object js 
Javascript :: js set iframe src 
Javascript :: capacitor.ionicframework.com to apk 
Javascript :: find and filter in javascript 
Javascript :: javascript anagram two strings 
Javascript :: string concatenation in js 
Javascript :: javascript remove space 
Javascript :: do while javascript 
Javascript :: (Unauthorized) not authorized on admin to execute command 
Javascript :: print all days names of a month js javascript 
Javascript :: react-file-base64 
Javascript :: javascript convert image to base64 
Javascript :: how to install vue 
Javascript :: Downward Triangle Star Pattern in JavaScript 
Javascript :: js read xml file 
Javascript :: express router file 
Javascript :: setting up fontawesome with react project 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =