When I generate a kendo control thanks to Jquery, it is easy to select and put it in a javscript var for doing stuffs on it
I would like to be able to select the same kendo control generated by the helper way, and put it in javascript var but i can't manage to do it . Any ideas??????
@section scripts
{
<
script
>
$(document).ready(function () {
var slider = jQuery("#slider").kendoSlider({
increaseButtonTitle: "Right",
decreaseButtonTitle: "Left",
showButtons: true,
min: 1,
max: 4,
largeStep: 1,
tooltip: {
enabled: false
}
});
});
</
script
>
}
<
input
id
=
"slider"
class
=
"sliderClass"
/>
@section scripts
{
<
script
>
var slider = $(".balSlider").kendoSlider; //want to select the kendo control and put it in a var but FAIL!!!
</
script
>
}
@(Html.Kendo().Slider()
.Name("titio")
.IncreaseButtonTitle("Right")
.DecreaseButtonTitle("Left")
.Min(0)
.Max(3)
.SmallStep(1)
.Value(0)
.Events(events => events
.Slide("sliderSlide")
)
.HtmlAttributes(new { @class = "balSlider" })
))