concept csv in category jQuery

This is an excerpt from Manning's book Extending jQuery.
You call $.ajaxPrefilter to register a new prefilter function
. Note that you don’t have to provide a data type to match against, as * is assumed for all types. In this case, you want all requests for files with the .csv extension to be treated as the csv data type, so you test the provided URL to see whether it ends in the required text
and return the new data type if so
.
As before, you create a standalone function, but this one converts the CSV object into an HTML table
. The body of this function
is identical to the success callback used in the previous converter (see listing 12.7). Generate a table as a string value by stepping through each field name for header cells, then through each row for detail cells. The resulting text is instantiated as DOM elements by jQuery, and that object is returned
.
. Note that you don’t have to provide a data type to match against, as * is assumed for all types. In this case, you want all requests for files with the .csv extension to be treated as the csv data type, so you test the provided URL to see whether it ends in the required text
and return the new data type if so
.