mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-01 13:24:10 +01:00
Fix: jQuery migrate warning on display length initial setting
- jQuery migrate gives a warning about the use of `attr` rather than `prop`. However, we should really just be using `val` here - much easier. - Thread: 13931
This commit is contained in:
parent
8045c7471e
commit
f35801b111
9
media/js/jquery.dataTables.js
vendored
9
media/js/jquery.dataTables.js
vendored
@ -2689,12 +2689,9 @@
|
||||
nLength.className = oSettings.oClasses.sLength;
|
||||
nLength.innerHTML = '<label>'+oSettings.oLanguage.sLengthMenu.replace( '_MENU_', sStdMenu )+'</label>';
|
||||
|
||||
/*
|
||||
* Set the length to the current display length - thanks to Andrea Pavlovic for this fix,
|
||||
* and Stefan Skopnik for fixing the fix!
|
||||
*/
|
||||
$('select option[value="'+oSettings._iDisplayLength+'"]', nLength).attr("selected", true);
|
||||
|
||||
/* Set the length to the current display length */
|
||||
$('select', nLength).val( oSettings._iDisplayLength );
|
||||
|
||||
$('select', nLength).bind( 'change.DT', function(e) {
|
||||
var iVal = $(this).val();
|
||||
|
||||
|
@ -44,12 +44,9 @@ function _fnFeatureHtmlLength ( oSettings )
|
||||
nLength.className = oSettings.oClasses.sLength;
|
||||
nLength.innerHTML = '<label>'+oSettings.oLanguage.sLengthMenu.replace( '_MENU_', sStdMenu )+'</label>';
|
||||
|
||||
/*
|
||||
* Set the length to the current display length - thanks to Andrea Pavlovic for this fix,
|
||||
* and Stefan Skopnik for fixing the fix!
|
||||
*/
|
||||
$('select option[value="'+oSettings._iDisplayLength+'"]', nLength).attr("selected", true);
|
||||
|
||||
/* Set the length to the current display length */
|
||||
$('select', nLength).val( oSettings._iDisplayLength );
|
||||
|
||||
$('select', nLength).bind( 'change.DT', function(e) {
|
||||
var iVal = $(this).val();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user