Jqueryui with meteor.js

I want to get into meteor.js to develop an application as my own, and it seems to make web development a lot easier.

The problem is that the application will have 2 related sortable nested lists, which I was going to use for usemjqueryui to sort.

I can’t find much if any examples or information about using jqueryui with meteor.js are just a few of the old days that use old versions of the meteor before the spark.

Can someone show me how this works, what is the recommended way to use both together and, if possible, an example or any links to this.

Is it also recommended to use them together or is there another way / library that I should use?

Thanks a lot Rick

+4
source share
1 answer

Rick, I use jquery-ui (as well as other jQuery-based plugins) with a meteor effect. Typically, I will give the element its jquery-ui-ness when the corresponding template was displayed, for example (in coffeescript):

# 'this' references the template Template.listOne.rendered = -> $(this.firstNode).find('ul.connectedSortable').sortable connectWith: '.connectedSortable' Template.listTwo.rendered = -> $(this.firstNode).find('ul.connectedSortable').sortable connectWith: '.connectedSortable' 

or you can make the element sorted after some event, for example:

 # 'this' now equals Window, so we must find the list from the event target Template.listOne.events 'click button': (e) -> $(e.target).parent().find('ul.connectedSortable').sortable connectWith: '.connectedSortable' 
+3
source

Source: https://habr.com/ru/post/1440862/


All Articles