Extending datatable in jquery ui widget

Extending datatable in jquery ui widget

Gopinath0332Gopinath0332 Posts: 6Questions: 0Answers: 0
edited January 2014 in General
First i want to thank Allan.for making this wonderfull tool.I am using Datatable for our multiple web pages. I would like to use my own custom widget which extends datatable instead of createing new instance of datatable in every page. i am trying my custom widget with below code and getting error as below

Code:
===
$.widget("demo.table", $.fn.DataTable, {
options: {
text: "default text"
},
_create: function() {
console.log("customText datatable widget created");
}
})
}

$("table").table();

Error:
===
Uncaught TypeError: Object [object Object] has no method 'each'.


Thanks :). Suggestion please
This discussion has been closed.