Use some example from Codrops, etc., just remember to put the AOD inside
Template.nameTemplate.rendered = function() {}
So this means that meteor loads this jscode when the template has been processed, and it can load any modal, etc.
So just follow the example you want and just install the jQuery plugin, etc. inside the rendered function
, , docs , , , , meteorPad, o repo github, ( , trickys = p)
meteor add iron:router, /app.js
Router.route('/', function () {
this.render('leaderboard');
});
, .
Template.deleteBtn.rendered = function(){
$('.open-modal').on('click', function(e){
$('#confirm').modal()
.on('click', '#delete', function (e) {
Players.remove(Session.get("selectedPlayer"));
});
});
}
UPDATE
, peppelg:bootstrap-3-modal,
<template name="modal">
</template>
.
Template.example.events({
'click #exampleButton':function(){
Modal.show('modal')
}
})
, 1-23 app.'s 41-62 main.html