INNER CODE UNIT · JavaScript
slider_max
business-science/free_r_tips · 030_slide_decks_xaringan/libs/datatables-binding/datatables.js:503
var slider_max = function() {
return filter.noUiSlider('options').range.max;
};
$input.on({
focus: function() {
$x0.show().trigger('show');
// first, make sure the slider div leaves at least 20px between
// the two (slider value) span's
$x0.width(Math.max(160, $span1.outerWidth() + $span2.outerWidth() + 20));
// then, if the input is really wide, make the slider the same
// width as the input
if ($x0.outerWidth() < $input.outerWidth()) {
$x0.outerWidth($input.outerWidth());
}
// make sure the slider div does not reach beyond the right margin
if ($(window).width() < $x0.offset().left + $x0.width()) {
$x0.offset({
'left': $input.offset().left + $input.outerWidth() - $x0.outerWidth()