1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-27 00:54:15 +01:00

Use jQuery.fn.prop to set a property of an element (instead of jQuery.fn.attr)

It's deprecated and triggers a note since `jquery.migration`
This commit is contained in:
Marc Bennewitz 2013-06-17 13:26:24 +02:00
parent 36ba2549ad
commit c3693875b8

View File

@ -1,5 +1,4 @@
/**
* Generate the node required for user display length changing
* @param {object} oSettings dataTables settings object
@ -48,7 +47,7 @@ function _fnFeatureHtmlLength ( oSettings )
* 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);
$('select option[value="'+oSettings._iDisplayLength+'"]', nLength).prop("selected", true);
$('select', nLength).bind( 'change.DT', function(e) {
var iVal = $(this).val();