Welcome Guest, Not a member yet? Register   Sign In
I need to apply a jquery function to some html that is loaded dynamically - document.ready alternative?
#1

[eluser]johnwbaxter[/eluser]
I'm using jquery to convert a multi-select field into a dropdown type box.

My jquery function is called using document.ready.

However, i also want this jquery function to be applied to some html i'm pulling in using ajax.

I click a button and the new html gets pulled in, however, the jquery function is not called because the page had already completed loading.

So my question is how can i get the function to be applied to the new bit of html? I've tried changing the function to

Code:
$("a#button_more_ajax").click( function() {

This doesn't work, what should i be using here? I'm a bit of a jquery dunce (working on it though!) so any gentle help would be great!

Thanks!!


Messages In This Thread
I need to apply a jquery function to some html that is loaded dynamically - document.ready alternative? - by El Forum - 10-12-2009, 06:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB