function(data){$("#foo").html(data).find(".clickable").click(function(){ // Do onclick stuff here });
- jake On Wed, Jun 25, 2008 at 6:51 AM, jebberwocky <[EMAIL PROTECTED]> wrote: > > hello all > > I have a js code as: > > $(document).ready(function() { > $(".menu-item2").click(function(){ > $.get("/foo" ,{cate:$(this).attr("name")}, > function(data){$("#foo").html(data); <== data = "<a > id="clickable" / >>" > });}); > }); > > and html: > > <div id="foo" ></div> > > the question is how do i add onclick to "clickable"??? >