diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index b578c204..3431491c 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -2689,12 +2689,9 @@ nLength.className = oSettings.oClasses.sLength; nLength.innerHTML = ''; - /* - * 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(); diff --git a/media/src/core/core.length.js b/media/src/core/core.length.js index 60c58040..0d34ca71 100644 --- a/media/src/core/core.length.js +++ b/media/src/core/core.length.js @@ -44,12 +44,9 @@ function _fnFeatureHtmlLength ( oSettings ) nLength.className = oSettings.oClasses.sLength; nLength.innerHTML = ''; - /* - * 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();