How To Work This Code?

hi friends…

i want to know that how to work the below code?


    category = $('.categoryFilter').serialize();



        {data: category}



this code taken from this link.

pls explain the working of this code?


That code is calling the [color="#0000FF"]update()[/color] method from [color="#0000FF"]yiiListView[/color] jQuery plugin whenever any element with class categoryFilter changes (f.e. select inputs).

The [color="#0000FF"]serialize()[/color] jQuery method takes all data from those inputs and converts them to an encoded query string, suitable for sending the data with an HTTP request.

As for the parameters in the update() call, [color="#0000FF"]ajaxListView[/color] is the ID of the list view container; and the second is the options map, i.e. the AJAX request options (see jQuery.ajax API manual).

Hope it helps.

thanks clapas…