THanks Renato.

Dave



Phish wrote:
> 
> I'm not quite familiar with jqGrid and how it creates tables, but when
> using the "click" or "bind" function, it only applies to static
> elements.  If you want to bind "click" to anything generated
> dynamically you will want to use the jquery "live" function.
> I'm assuming that jqGrid creates rows dynamically.
> 
> Example syntax:
> $(row).children('td').live("click", function(){
>  // do something here
> });
> 
> More documentation on 'live'
> http://docs.jquery.com/Events/live
> 
> Hope this helps,
> Renato
> 
> 
> 
> On Nov 12, 2:57 pm, davebrown <d...@dbws.net> wrote:
>> Hi All,
>>
>> Hoping someone might be able to help me here,  
>>
>> I'm trying specify a click function to a jqGrid's row during the
>> loadComplete event but having difficulty 'getting to' the tr element..
>>
>> What I've been trying is this sort of thing but with no result..
>>
>>         var ids = jQuery("#cell_list").getDataIDs();
>>         /* for each row loaded */
>>         for(var i=0;i<ids.length;i++){
>>             var row = ids[i];
>>             $(row).children('td').click(function(){
>>                   // do something here....
>>             })
>>        }
>>
>> Any advice here greatly appreciated,
>>
>> Thanks
>> --
>> View this message in
>> context:http://old.nabble.com/How-to-add-click%28%29-function-to-a-tr-during-...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-add-click%28%29-function-to-a-tr-during-grid-loadComplete-function.-tp26328069s27240p26333974.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to