Hi,

Create a function in the script tag and put the task that you want to
perform on the click of  btnGo

example:
*<script>
function demoFunction(){
    alert("hi")
}
</script>*

now just write the following code on some click :
*$('div').click(function(){
        $('#someId').append("<input type='button' id='btnGo'
        onClick='demoFunction()'>")
**})*



With Regards,
Chandan Luthra
Intelligrape Software Pvt. Ltd.

On Mon, Apr 6, 2009 at 18:10, amuhlou <amysch...@gmail.com> wrote:

>
> From the code you posted, it looks like you're missing the # in the
> btnGo selector, it should be $("#btnGo").click(function(){alert
> ('hi');});
>
> On Apr 6, 8:29 am, pankajspace <pankajsw....@gmail.com> wrote:
> > Hello,
> >
> >      I have written a code in which after clicking a button a html is
> > appending inside a div, I have used append() method in jquery for that
> > purpose. In the appended html code I have another button having id
> 'btnGo'.
> > After clicking on this button I want some further functionality, For that
> I
> > have written code like this:  $("btnGo").click(function(){alert('Hi');});
> > But the alert is not getting fired, Means that the click event is not
> > getting fired, Can anybody give me the solution ?
> >
> > Thanks and Regards,
> > Pankaj
> >
> > --
> > View this message in context:
> http://www.nabble.com/JQuery-and-append%28%29.-tp22906392s27240p22906...
> > Sent from the jQuery General Discussion mailing list archive at
> Nabble.com.
>

Reply via email to