I use http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js
Instead of keeping a version of the library myself. Is that a bad
idea? (I just thought Id always have the latest version this way)

BUT
This is where it REALLY shines thorough that I dont know what I am
talking about:

I dont know how to use live()

When this was (part of) my code:

$(".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+'">');

How do I use live()  ?


On 13 Jul., 22:34, "Rick Faircloth" <r...@whitestonemedia.com> wrote:
> If you're using jQuery 1.3 or above, it has a built-in function, .live(),
> that
> does almost the same thing are the .livequery plugin.  However, .live() is a
> little
> more limited as to the type of events it effects, such as blur.  Go with the
> .live()
> function if you can and avoid having to use another plug-in.  But if .live()
> doesn't
> work for the trigger (such as .blur), then use the plug-in, livequery.
>
> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of macjohn
> Sent: Monday, July 13, 2009 4:23 PM
> To: jQuery (English)
> Subject: [jQuery] Re: Why does my Jquery elements handles not work?
>
> oh, ok. I need a plugin to do this? Ok, great Ill check it out. Thanks
>
> On 13 Jul., 22:16, "Rick Faircloth" <r...@whitestonemedia.com> wrote:
> > Check out the .livequery plug-in or, for jQuery 1.3 and above, the .live()
> > function.
>
> > -----Original Message-----
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> > Behalf Of macjohn
> > Sent: Monday, July 13, 2009 4:12 PM
> > To: jQuery (English)
> > Subject: [jQuery] Why does my Jquery elements handles not work?
>
> > 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