[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread timothytoe
Yeah, this doesn't make sense. Either the HTML is served (exists) or it's created on the fly in some way later on by JavaScript. On Sep 5, 8:01 am, S P Arif Sahari Wibowo <[EMAIL PROTECTED]> wrote: > On Fri, 5 Sep 2008, lukas wrote: > > My PHP code creates a button which doesn't exist when my pag

[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread lukas
Thank you. I added LiveQuery but get the error message in Firebug: jQuery(".inputsubmit").livequery is not a function my code: jQuery(document).ready(function(){ jQuery(".inputsubmit").livequery('click', function(event){

[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread hazy
Look at the livequery plugin. On Sep 5, 3:49 pm, lukas <[EMAIL PROTECTED]> wrote: > My PHP code creates a button which doesn't exist when my page is > loaded.  Hence, the according jQuery command doesn't work. How can I > fix this? Thank you!

[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread S P Arif Sahari Wibowo
On Fri, 5 Sep 2008, lukas wrote: > My PHP code creates a button which doesn't exist when my page > is loaded. Hence, the according jQuery command doesn't work. Not sure what you meant. For server-side scripting - such as PHP - loading a page is the only way for the script to create HTML objec

[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread Ryan Zec
If you use the livequery plugin, it will apply trigger events like click on element that are not available when the dom is first loaded. On Fri, Sep 5, 2008 at 10:49 AM, lukas <[EMAIL PROTECTED]> wrote: > > My PHP code creates a button which doesn't exist when my page is > loaded. Hence, the acc

[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread Rey Bango
You need to bind an event handler to your button after you've created it. I would suggest you look at the click() method in the jQuery docs for ideas and examples of how to manage that. Rey... lukas wrote: My PHP code creates a button which doesn't exist when my page is loaded. Hence, the