add ajax success function callback to jquery function
<pre><code>(function ($) {
        $.fn.sendAuditToHandler = function (options) {

            var defaultSettings = {
                'url': '../SentinelOperationsUI/GenericHandler.ashx'
            };

            var objectToSend = {};

            var opts = $.extend(defaultSettings, options);

            $(this).find('input[type=text], select').each(function (i, val) {

                var objectKey = $(val).attr('class');
                var objectValue = $(val).val();

                objectToSend[objectKey] = objectValue;
            });

            objectToSend = JSON.stringify(objectToSend);

            $.ajax({
                url: opts.url,
                data: { 'AuditObject': objectToSend },
                success: function (data) {

                }
            });

            return this;

        };
    })(jQuery);
</code></pre>

<p>What i would like to use is something like to make use of the ajax success function in my function call. Something like</p>

<pre><code>sendAuditToHandler({ /* some options */ }, success: function() { //ajax success callback function }...
</code></pre>
