Rachel
Rachel

Reputation: 103397

How to create own functions using jQuery and call it in another functions?

I have piece of function which I am trying to call at two different places and so am thinking to put it inside a function and call that function at two different places.

I am not sure how this can be done using jQuery:

Any Sample examples would be appreciated ?

Upvotes: 0

Views: 202

Answers (1)

chris
chris

Reputation: 9993

you don't need to worry about jQuery - just define your function :

function myFunction() {
  ...
}

and then call it wherever you like :

myFunction();

Upvotes: 4

Related Questions