JavaScript Moving DataTables pagination length dropdown datatables move pagination to left,datatables move pagination to top,

I'm trying to move the dropdown that DataTables uses to determine how many rows to display. One way I thought of was to use jQuery's prependTo()/appendTo() functions, but it feels a bit too hack-y. I tried searching through the DataTables API to see if there was some native way of doing it, but I couldn't find anything. I was wondering if there was a better way to do this.

This is basically what I'm trying to do: http://jsfiddle.net/jbZG7/

$("#tableID").dataTable();
$("#tableID_length").prependTo("#new-div-id");

Thanks!

Answer:1

I created a custom dataTables widget which combined jQuery UI Dialog with DataTables. I too needed to move dataTable controls to custom locations, which could not be accomplished with sDOM very much in the same way you need to.

When looking for a solutions I was concerned about .appendTo/.prependTo being too hacky, but as it turns out .appendTo/.prependTo are the best solutions I have found.

$('tableID').dataTable({
  fnInitComplete : function( oSettings, json ){
   $("#tableID_length").detach().prependTo("#new-div-id");
  }
});

Updated jsFiddle

fnInitComplete

Answer:2

I'm very new to Javascript and pretty new to CSS/HTML as well. I'm trying to create a vertical menu with CSS and javascript. The sublevels should appear on the right of the menu when someone click on ...

I'm very new to Javascript and pretty new to CSS/HTML as well. I'm trying to create a vertical menu with CSS and javascript. The sublevels should appear on the right of the menu when someone click on ...

I am using the Gantt Chart provided by Google. I have added a listener to when I click on any of the elements or entity in attempt to return the row/columns data, but it is returning empty, ...

I am using the Gantt Chart provided by Google. I have added a listener to when I click on any of the elements or entity in attempt to return the row/columns data, but it is returning empty, ...

  1. google gantt chart template
  2. google gantt chart maker
  3. google gantt chart app
  4. google gantt chart free
  5. google gantt chart dependencies
  6. google gantt chart custom tooltip
  7. google gantt chart react
  8. google gantt chart options
  9. google gantt chart angular
  10. google gantt chart javascript
  11. google gantt chart generator
  12. google gantt chart examples
  13. google gantt chart bar color
  14. google gantt chart scroll bar
  15. google gantt chart jsfiddle
  16. google gantt chart date format
  17. google gantt chart drag and drop

Noob at polymer here, so please bear with me. I'm trying to learn how to create a form, one that requires the user to input text into a textbox, before hitting "Submit". Should the user hit "Submit" ...

Noob at polymer here, so please bear with me. I'm trying to learn how to create a form, one that requires the user to input text into a textbox, before hitting "Submit". Should the user hit "Submit" ...

  1. polymer input validation
  2. polymer field validation
  3. polymer paper-input validation
  4. polymer form input validation
  5. polymer 3 paper input validation

I have been working with a page that redirects a user to either an installed application or a webpage (the fallback). This is called when the page first loads via ClientScript.RegisterStartupScript; ...

I have been working with a page that redirects a user to either an installed application or a webpage (the fallback). This is called when the page first loads via ClientScript.RegisterStartupScript; ...

  1. settimeout redirect not working