I have a JS function that I need to execute it when page loads. Here is the function:
function myfunc(){
alert('something');
}
Noted that I also need to have a name for it. Because I need to call it after page loading again (on click of a element).
So in short, I need to define a function which executes both on page loading and when user click on $('.myclass')
element. How can I do that?