Q:

how do i export a .csv file using jquery

I am trying to export a dynamically generated table into a .csv file, but when i click on export button i get an error: 0x800a1391 - JavaScript runtime error: 'CSV' is undefined
i am using this example JSFiddle  it works fine here but when i migrate the code i get an error: 
This is my jquery that does exporting on a button click:
   $('.btnDownload').on('click', function () {
            $(function () {
                CSV.begin('#showTable').download('file.csv').go();
            });
[MY JSFIDDLE][2] this how my code is, in my project i am using jquery-2.0.3.js

A:

you need to add a script tag with Src="http://www.csvscript.com/dev/html5csv.js"
I think you are not doing that.