Hi all!

I am a newbie in Jquery.
And I have encountered a problem:

Using Jquery, I am replacing a submit button with a different submit
button.

So far so good. It works and looks right, in the generated sourcecode
(when checking it in Firebug).

HOWEVER:
The new generated submit button does NOT trigger my JQuery script?!
If I refresh the page, so that the exact same button is being
generated by php, - my Jquery script fires and works perfectly.....
whats up with that?

I also notice that if I have JQuery generate a regular mouseover on an
image event - the mouseover-Javascript does not fire, when the image
and handles are generated by Jquery. (again, the generated sourcecode
looks correct).

I generate like this:
On the submitbutton that I want to replace I have a unique class-name
and unique numer on "id".

Snip from JQuery script:
$(".koeb").click(function(){
var element = $(this);
var Id = element.attr("id");

$("#shop_togglebox_1_"+Id).html('<input type="submit" class="afbestil"
value="Remove element" id="'+Id+'">');


And this looks correct on the screen, and the css sees the class
"afbestil" and does all the correct styling.
BUT the script corresponding to the class "afbestil" does not fire.

Unless I refresh the page. The PHP generates the exact same submit
button, with alle the same properties. And NOW the Jquery fires.....

Can anyone help?



Reply via email to