I have created a Calendar component and all the JS is applied to it on document.ready
. When I do an Ajax call and re-render the component, the JS/JQuery is not there anymore. This can be solved by adding the JS in-line but has a performance overhead. How can I re-apply my JS behaviour after the component is re-rendered?
My generated HTML code looks like this.
<div class="input-append date">
<input data-format="dd/MM/yyyy hh:mm:ss" type="text"></input>
<span class="add-on">
<i data-time-icon="icon-time" data-date-icon="icon-calendar"> </i>
</span>
</div>
Thanks