4 ms·
Yeah chaining is a way to do it. I've recently gotten addicted to chaining though. So now a lot of my functions look like this. A listener for the timespan navi
by jayair 17y ago
Yeah chaining is a way to do it. I've recently gotten addicted to chaining though. So now a lot of my functions look like this. A listener for the timespan navigation that Cadmus has:
'onNextTimespanClick': function(e, el) {
return this
.onNavigationClickStopEvent(e, el)
.scrollToTop()
.animateNavChange(
this.getSelectedNavigationEl(),
$$(
'div.navigation a[href='
+ this.getHashFromUrl(el.href)
+ ']',
this.navigationContainer
)
)
.refreshItems();
},