Response title
This is preview!
icn = "<div class='icon'/>" ;
$(icn).click(function(){
alert('clicked') ;
});
$("#functions").append( $(icn) ) ;
icn = $("<div class='icon'/>") ;
icn.click(function(){
alert('clicked') ;
});
$("#functions",html).append( icn ) ;
nicholasstephan wrote:icn = "<div class='icon'/>" ;
$(icn).click(function(){
alert('clicked') ;
});
$("#functions").append( $(icn) ) ;
// Untested
var icn = $("<div class='icon'/>")
.click(function(){
alert('clicked') ;
})
.appendTo("#functions");
© 2013 jQuery Foundation
Sponsored by and others.