Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Where to bind .sortable() for a can.component?

$
0
0
Given the ToDo MVC example here http://todomvc.com/examples/canjs_require/,  where would I attach jqueryui's sortable (http://jqueryui.com/sortable/)?  I thought perhaps in the init event of todos-list component, but what I found is that this.element at init time is just <todos-list data-view-id='123'></todos-list> , none of the template has been rendered and I want to attached .sortable() to the <ul> from the template, same with setup(). Note: I think it would be best to keep the sortable() call inthe todos-list component, just not sure when that initial UL will be available.


(is there an official TodoMVC CanJS fiddle?  no sure where I forked that one from)

Thanks,
Mark 

Viewing all articles
Browse latest Browse all 3491

Trending Articles