I'm trying to convert the following jquery script in DART :
<script>
(function($){
$(window).load(function(){
$(".content").mCustomScrollbar();
});
})(jQuery);
</script>
I've wrote the following code in DART :
js.context
.callMethod(r'$', ['.content"'])
.callMethod('mCustomScrollbar');
But it's not working. Any help is appreciated.
Aside the typo in ['.content"']
(instead of ['.content']
) it looks good to me if you are using import dart:js;
and not import 'package:js/js.dart'
.