Hi,

What you say is exactly what the alternative would be.
Just you have better insight of what is needed...

I have a class "tip_class".  Each element that has this class needs to
have a tooltip initiated.
What I do when the page is loaded, is indeed loop through all elements
that have this class, and execute the flexinInitialiseElement method
which does indeed create the tooltip when the element has this class
(or does other initialisations, based on the classes added to the
element...)

I'm using jqGrid (http://www.trirand.com/jqgridwiki/doku.php), and one
of the columns in the grid basically is a list of icons with a link
for each action that can be performed on the object associated with
the record in the grid.

This works good, and the code is something liks:

<a href="link"><img src="url" class="tipcaption"></a>

I need javascript to be executed on these elements, without the need
for me to explicitely write it or call the flexinInitialiseElement
method upon refreshing the grid's content.
Basically, the classes should be the driver for executing
initialisation code, which I hoped I could achieve with the live
option...

Does this make myself more clear? :)

David.

On 25 dec, 20:07, Šime Vidas <sime.vi...@gmail.com> wrote:
> The load event wont help you... it has to do with stuff having
> finished loading, but you are creating new elements based on an AJAX
> response, so the new elements are not being loaded at all.
>
> Well, you can allways initialize the elements after you create
> them.... I can't see the problem ....
>
> For example.....
>
> 1. you get the AJAX response
>
> 2. you create new elements
>
> 3. you initialize them

Reply via email to