Dom of Plugin

Dom of Plugin

bubuzzzbubuzzz Posts: 26Questions: 0Answers: 0
edited November 2011 in DataTables 1.8
Hi all,

I am trying to make a plugin of Datatables for my current project. What i need to do is make a list of controls on the header (between the length and filter div). How can i do that ? I created the plugin to generate all the controls already

Regards

Replies

  • bubuzzzbubuzzz Posts: 26Questions: 0Answers: 0
    i use a work-around way. I write the "_fnDrawCalback" function and changet the dom struture. Not sure whether this is a optimal solution or not

    [code]
    "_fnDrawCallback" : function() {
    $('.dataTables_wrapper .clear').append(this.dom.wrapper);
    },
    [/code]
  • bubuzzzbubuzzz Posts: 26Questions: 0Answers: 0
    obviously, the first diadvantage of this way is this plugin only can be applied when there is only one datatable on page
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    edited November 2011
    The order of the controls that DataTables adds is defined by sDom . There is an example of how to use it here: http://www.datatables.net/release-datatables/examples/basic_init/dom.html

    Allan
  • bubuzzzbubuzzz Posts: 26Questions: 0Answers: 0
    awesome !!!!! :D
This discussion has been closed.