get value when slider has no id property

2 posts, 0 answers
  1. Morten
    Morten avatar
    267 posts
    Member since:
    Jul 2012

    Posted 22 Apr Link to this post

    I can initialize the slider from both class and id property.

    However, I can't get the value when the slider is instantiated from class:


    The second console.log below produces "Cannot read property 'value' of undefined"



      value: 10,
      smallStep: 10,
      largeStep: 50,
      showButtons: false
      value: 20,
      smallStep: 10,
      largeStep: 50,
      showButtons: false
    var $sliderFromId = $("#slider").data("kendoSlider");
    var $sliderFromClass = $(".slider").data("kendoSlider");
  2. Kiril Nikolov
    Kiril Nikolov avatar
    2543 posts

    Posted 25 Apr Link to this post


    Selecting elements with class name will return a collection, while you need a single instance of the Kendo UI Slider, so please get a single instance and try again.

    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top