DataTables CDN fallback expressions

2019-09-08 08:55发布

问题:

What are the CDN fallback expressions for the DataTables script and its extensions? https://cdn.datatables.net

For example (source):

jQuery     -->  window.jQuery
jQuery.UI  -->  window.jQuery.ui
Modernizr  -->  window.Modernizr
Bootstrap  -->  $.fn.modal

回答1:

You can determine whether jQuery DataTables is available by testing whether $.fn.dataTable exists.

So I assume you need to use:

bundle.CdnFallbackExpression = "$.fn.dataTable";