Merge branch 'eugenb1-patch-1'

This commit is contained in:
John Bender 2011-12-06 16:10:12 -08:00
commit c45160973a
2 changed files with 9 additions and 1 deletions

View file

@ -315,7 +315,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
this.handle.attr( {
"aria-valuenow": cType === "input" ? newval : control.find( "option" ).eq( newval ).attr( "value" ),
"aria-valuetext": cType === "input" ? newval : control.find( "option" ).eq( newval ).getEncodedText(),
title: newval
title: cType === "input" ? newval : control.find( "option" ).eq( newval ).getEncodedText()
});
// add/remove classes for flip toggle switch

View file

@ -27,4 +27,12 @@
same( slider.attr('min'), "10", "slider min is greater than 0" );
same( slider.val( '' ).slider( 'refresh' ).val(), slider.attr('min'), "val is equal to min attr");
});
test( "flip toggle switch title should be current selected value attr", function() {
var slider = $( "#slider-switch" );
same(slider.siblings(".ui-slider").find("a").attr('title'),
$(slider.find("option")[slider[0].selectedIndex]).text(),
"verify that the link title is set to the selected option text");
});
})( jQuery );