Skip to content

Instantly share code, notes, and snippets.

@cknoxrun
Created December 8, 2015 16:25
Show Gist options
  • Select an option

  • Save cknoxrun/67571df22b1af8b3c296 to your computer and use it in GitHub Desktop.

Select an option

Save cknoxrun/67571df22b1af8b3c296 to your computer and use it in GitHub Desktop.
$ ->
$('.gene-regulations').each ->
table = $(this)
source = table.data('source')
table.dataTable
processing: true
serverSide: true
ajax: source
aoColumnDefs: [
# Don't sort columns with class 'no-sort'
{ bSortable: false, aTargets: ["no-sort"] }
]
# reset modals loaded from remote when hidden
# allows us to re-use modals
$ ->
$(document).on 'hidden.bs.modal', (e) ->
$(e.target).removeData('bs.modal')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment