Using jqrangeslider with dart js-interop does not work

旧时模样 提交于 2019-12-11 18:37:55

问题


I am trying to use the jqrangeslider ( http://ghusse.github.io/jQRangeSlider/index.html ) in my web_ui app and it is not working.

In my application main root dart file I have:

void main() {

js.scoped((){
  js.context.jQuery("#slider").bind("valuesChanged", new js.Callback.many((e, data) {
    fromRange = data.values.min;
    toRange = data.values.max;
  }));
});

main root html file I have:

  <script src="jquery.min.js"></script>
  <script src="jquery-ui.custom.min.js"></script>
  <script src="jQRangeSlider-min.js"></script>
  <script src="../packages/browser/dart.js"></script>
  <script src="../packages/browser/interop.js"></script>

In the custom components html file I have:

<div id="slider"></div>

<script>
    $("#slider").rangeSlider();
  </script>

The slider simply does not appear at all.

Any help appreciated. Thanks.

来源:https://stackoverflow.com/questions/18639922/using-jqrangeslider-with-dart-js-interop-does-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!