title: Calling a callback in javascript
body: <p>I am not so strong in javascript.</p>
  
  <p>I have a common function that I call from many parts of my code passing them some parameters. </p>
  
  <p>Can somebody help me on </p>
  
  <ul>
  <li>how to define a new parameter for this function that should be a callback with no parameters passed from the caller (like many jquery plugins do)</li>
  <li>how to handle the callback call inside the function</li>
  </ul>
  
  <p>Giving advice regarding the solution, if there's a better one, etc.</p>
  
  <p>thanks a lot!</p>