0

I am defining a DataTable like this:

var yadcf_data_2;
var oTable = $('#example').DataTable({
  "serverSide": true,
  "ajax": {"url": "/platform/elements/?format=datatables",
           "dataSrc": function(json){
             yadcf_data_2 = json.options.yadcf_data_2
             console.log(yadcf_data_2)
             return json.data;
            }
          }

How would I use yadcf_data_2 outside of the variable in which it was defined, like this?

yadcf.exRefreshColumnFilterWithDataProp(oTable, 3, yadcf_data_2);
OverflowingTheGlass
  • 2,324
  • 1
  • 27
  • 75

0 Answers0