[jQuery] Content Loading Question

[jQuery] Content Loading Question


Hello,
I'm trying to make a div give me a nice loading graphic on top of my
data so the user knows the page is working on their request.
I have the following code, however it seems it either happens to
quickly or the event isn't working as expected.
    \$("#query_button").click(function(){
        \$('#query').addClass('grid-loading');
        var store = \$("select#store").val();
        var dept = \$("select#dept").val();
        \$("#query").load('content.cgi', {storeselect: store, deptselect:
dept});
        \$('#query').removeClass('grid-loading');
    });
Anyone see what I'm doing wrong here?