April 22, 2015, 11:00am
I have this code. The problem is button viewcart click is not executed when click. Button viewcart is inside a popover. Any ideas how to trigger the event of button click viewcart?
button.btn.btn-info.cart(name="cart", type="button", data-container="body", data-toggle="popover", data-placement="buttom") Cart
Template.header.rendered = ->
placement : 'bottom'
button.viewcart View Cart
"click .viewcart": ->
console.log 'im click!'
You’re are creating a new element with this
$('#popover-content').html(), it wont be attached to blaze (don’t know if this is the right way to put it). I faced the same issue with popovers on google maps. Where is the popover placed in the DOM?
EDIT: One thing you can do is instead of creating the template that way, just render it somewhere and make it appear whenever you need. You can see how they do it here
April 23, 2015, 7:29am
@gabrielpoca Your right. Hopefully there will be a facility that allow blaze to re read the page. . If you have time you can put your answer in my post in stackoverflow . I can give the points to you
thank you, I hope the package helps.