jQuery
New Wave Javascript
discuss » dynamically loading html into a container and then....
Posted: Tue Jan 31 17:04:30 EST 2006
From: Mark Panay <
markpanay at gmail.com
>
right ok, i see, sorry. :)
Ok, now the problem is i'm loading in the LI's (and UL) from an AHAH
request to a script into a "preview" DIV container, the problem seems
to be that once the LI's are loaded externally they need to be
"synced" with the page, or they don't seem to be able to have an event
attached to them. Which is why I generated the onlclick events
dynamically onto the LI elements in the script page (asp.net).
I'm having a similar problem with JAVASCRIPT in an external page call
via AHAH not executing in the "host" page, i think the page needs to
be re-initialised or something...
I think it's starting to beat me... ;)
I hope I'm making sense here. If its any consolation, I'll have a nice
app to show off the simplicity of JQuery. A non "WEB 2.0" (sic) is at
www.tunecast.co.uk
thanks
mark.
On 31/01/06, John Resig <
jeresig at gmail.com> wrote:
>
.html loads HTML into an element, for example:
>
>
$("ul").html("<li>foo</li><li>bar</li>"); is the same as doing:
>
>
$("ul").each(function(){
>
this.innerHTML = "<li>foo</li><li>bar</li>";
>
});
>
>
It's simply a convenience method. More info here:
>
http://jquery.com/docs/BaseDOM/
>
>
--John
>
>
On 1/31/06, Mark Panay <markpanay at gmail.com> wrote:
>
> ok thanks, i'll try this.
>
>
>
> i'm not sure what the .html does?
>
>
>
>
>
> mark.
>
>
>
>
--
Mark Panay
www.markpanay.com
Jargon Free Web Development