html required body to be there. But if at the time of install of this plugin (which is at the start of loading of html page), body element has not still loaded, then injection of html would fail as was happening in my case. This html should be injected only when show method is called as it is not needed prior to that. Also, in case of loading templates through underscore.js, the template html can replace this injected code if it is injected so early.
btn.onclick event was not binding to the correct button index due to closure issue. So, created a wrapper of an immediate function over the onclick handler.
…eetProxy.js
html required body to be there. But if at the time of install of this plugin (which is at the start of loading of html page), body element has not still loaded, then injection of html would fail as was happening in my case. This html should be injected only when show method is called as it is not needed prior to that. Also, in case of loading templates through underscore.js, the template html can replace this injected code if it is injected so early.
btn.onclick event was not binding to the correct button index due to closure issue. So, created a wrapper of an immediate function over the onclick handler.