mirror of
https://github.com/FortAwesome/Font-Awesome.git
synced 2024-11-20 11:14:28 +00:00
26 lines
641 B
JavaScript
26 lines
641 B
JavaScript
$(function() {
|
|
var MainView = Backbone.View.extend({
|
|
el: $("div.container"),
|
|
|
|
modalTemplate: _.template($("#modal-template").html()),
|
|
|
|
events:{
|
|
"click ul.the-icons > li": "iconClicked"
|
|
},
|
|
|
|
iconClicked: function(event) {
|
|
event.preventDefault();
|
|
|
|
var $item = $(event.currentTarget);
|
|
var $modal = $(this.modalTemplate({"iconName": $item.find("i").attr("class")}));
|
|
|
|
$modal.modal("show");
|
|
$modal.on('hidden', function () {
|
|
$modal.remove();
|
|
})
|
|
}
|
|
});
|
|
|
|
var mainView = new MainView();
|
|
});
|