From dcd3cd516c9b4156203749e4a36e8a940b19380e Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Wed, 13 May 2015 22:01:09 -0400 Subject: [PATCH] Slider: Remove core event/alias and deprecated module dependencies --- demos/slider/hotelrooms.html | 2 +- tests/unit/slider/options.js | 2 +- ui/slider.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demos/slider/hotelrooms.html b/demos/slider/hotelrooms.html index e5ee79c55..0268d1dc0 100644 --- a/demos/slider/hotelrooms.html +++ b/demos/slider/hotelrooms.html @@ -22,7 +22,7 @@ select[ 0 ].selectedIndex = ui.value - 1; } }); - $( "#minbeds" ).change(function() { + $( "#minbeds" ).on( "change", function() { slider.slider( "value", this.selectedIndex + 1 ); }); }); diff --git a/tests/unit/slider/options.js b/tests/unit/slider/options.js index 8e43c3e89..02d7f8891 100644 --- a/tests/unit/slider/options.js +++ b/tests/unit/slider/options.js @@ -16,7 +16,7 @@ test( "disabled", function( assert ){ var count = 0; element = $( "#slider1" ).slider(); - element.bind( "slidestart", function() { + element.on( "slidestart", function() { count++; }); diff --git a/ui/slider.js b/ui/slider.js index 131f93fb0..830c1cbd7 100644 --- a/ui/slider.js +++ b/ui/slider.js @@ -214,7 +214,7 @@ return $.widget( "ui.slider", $.ui.mouse, { this._handleIndex = index; this._addClass( closestHandle, null, "ui-state-active" ); - closestHandle.focus(); + closestHandle.trigger( "focus" ); offset = closestHandle.offset(); mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );