Font-Awesome/docs/assets/js/index/index.js

26 lines
638 B
JavaScript
Raw Normal View History

2012-03-09 05:02:49 +00:00
$(function() {
var MainView = Backbone.View.extend({
el: $("div.container"),
modalTemplate: _.template($("#modal-template").html()),
events:{
"click ul.the-icons > li": "iconClicked"
2012-03-09 05:02:49 +00:00
},
iconClicked: function(event) {
event.preventDefault();
var $item = $(event.currentTarget);
var $modal = $(this.modalTemplate({"style": $item.find("i").attr("class")}));
2012-03-09 05:02:49 +00:00
$modal.modal("show");
$modal.on('hidden', function () {
$modal.remove();
})
}
});
var mainView = new MainView();
});