How do I override the Tagalys JS?

We expose some Tagalys UI templates through the $.fn.tagalys_templates object. You can define your overrides within this object. The overrides should be in the form of a function that receives appropriate data and returns a jQuery DOM object or an HTML string. If you return a jQuery DOM object, you can attach events to achieve complex behavior.