I am trying to update the value of Telerik MVC slider from a text field which is updated from a javascript. Here is the Telerik script:
<input value="" id="PSlice" name="PSlice" />
<%= Html.Telerik().Slider<int>()
.Name("SliceSlider")
.HtmlAttributes(new { style = "color: white" })
.TickPlacement(SliderTickPlacement.None)
.Value((int[])$('#PSlice').val())
.Max(100)
.Min(0)
.ClientEvents(events => events
.OnLoad("onLoadSlider")
.OnChange("onChangeSlider")
.OnSlide("onSlideSlider"))
%><br />
I get the following error:
Unexpected character '$'
.Value((int[])$('#PSlice').val())
I put the value of the text field from:
function Playimages() {
i = (i < sl - 1) ? (i + 1) : 0;
$('#Image1').attr('src', images[i].src);
$('#PSlice').val(i);
}
Would appreciate your suggestions.