I did declare click like that in my template
<script id="flipTemplate" type="text/html">
    <div data-bind="attr: {id:  ImageName }, click: alert('a')">
    ......
</script>
But alert('a') executing straight away i clicking my button which is generated dynamic content instead of alerting when i am clicking on that div.
is there any way how to fix that?