Skip to content

Instantly share code, notes, and snippets.

@JonnyFunFun
Created March 18, 2015 18:31
Show Gist options
  • Save JonnyFunFun/00d94e1f413152cd25c8 to your computer and use it in GitHub Desktop.
Save JonnyFunFun/00d94e1f413152cd25c8 to your computer and use it in GitHub Desktop.
comment reverse mashup
/*
* Placeholder: footerPlaceholder
*/
tau.mashups
.addDependency("jQuery")
.addDependency('app.bus')
.addMashup(function($, $deferred, config) {
/* our reused placement function */
$deferred.then(function(bus) {
bus.on('afterRender', $.proxy(function(e, obj, data) {
try {
if ($(obj.element[0]).is('.ui-comments-control')) {
setTimeout(function() {
$('div.ui-comments-content').append($('div.ui-comments-content').children('div.ui-comment').get().reverse());
}, 500);
}
} catch (e) { console.log(e); }
}, this));
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment