Example of callbacks.fireWith() in jQuery
March 30, 2013
fireWith() in jQuery executes the callback methods with a context and array of arguments. fireWith() is used as
callbacks.fireWith( context, [array of arguments]);
<html> <body> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script> var cal = function(a,b) { console.log(a+b); }; var callbacks = $.Callbacks(); callbacks.add( cal ); callbacks.fireWith( window, [3,2]); </script> </body> </html>