How do I return an elements class in jQuery?
<p>I would like to send the class of an element to a function. Basically, I need to tell showAjaxLoader() that it should show the loading icon for the element being clicked!</p>

<pre><code>jQuery(function($) {
    var showAjaxLoader = function(selector) {
        $(selector).empty().html('&lt;img src="loading.gif" /&gt;');
        };

    $(".add")
        .bind("ajax:beforeSend", function(event, data, status, xhr) {
            var class = this.class;
            showAjaxLoader(class);
    });
});
</code></pre>
