---
title: Events callback
slug: template-js/events-callback
docTags: 
createdAt: 2022-06-28T00:56:46.000Z
---



Below are some useful callback examples.

See : [Events](docId\:RkzthurSamevyEXDJZsNw)  for more detals on syntax and options

## QuickSearch

```javascript

klevu.coreEvent.attach("setRemoteConfigQuickOverride", {
    name: "attachRemoteConfigQuickOverride",
    fire: function () {
        klevu.each(
            klevu.search.extraSearchBox, function (key, box) {

                box.getScope().chains.events.focus.add({
                name: "customFocusEvent",
                fire: function (data, scope) {
                        console.log("[EVENT] Quick Search on focus event");
                    }
                });

                box.getScope().chains.events.keyUp.add({
                name: "customKeyUpEvent",
                fire: function (data, scope) {
                        console.log("[EVENT] Quick Search on keyup event");
                    }
                });

                box.getScope().chains.request.send.add({
                name: "customSendEvent",
                fire: function (data, scope) {
                        console.log("[EVENT] Quick Search send search request");
                    }
                });

                box.getScope().chains.template.render.add({
                name: "customRenderEvent",
                fire: function (data, scope) {
                        console.log("[EVENT] Quick Search results rendering")
                    }
                });

                box.getScope().chains.template.events.add({
                name: "customAfterRenderEvent",
                fire: function (data, scope) {
                        console.log("[EVENT] Quick Search results rendered")
                    }
                });


            }
        );
    }
});
```

## Template

```javascript
klevu.search.landing.getScope().chains.template.events.add({
  name: "renderResponseCustom",
  fire: function(data, scope) {

    console.log("Klevu Template rendered");

  }
});
```



.











