diff --git a/templates.html b/templates.html
index b4f10ce..1558d1a 100755
--- a/templates.html
+++ b/templates.html
@@ -185,13 +185,18 @@ $(function(){
.clone()
.appendTo($('.container .preview'))
.click(function(){
- alert(this.outerHTML)
+ $('.container').trigger('templateSelected', this)
return false
})
$('.container .preview')
.css('display', 'block')
})
+ $('.container')
+ .on('templateSelected', function(evt, elem){
+ alert(elem.outerHTML)
+ })
+
})