var lastClicked;
$('.A_tables').click(function(){
     lastClicked = this;
});

later on

$('.B_tables input').click(function(){
   $(lastClicked).css('background','lime');
});

On Jan 21, 7:26 pm, Ron <ron.ce...@gmail.com> wrote:
> Hi,
> How do I refer back to a specific element?
>
> This is the scenario I'm trying to build:
> Clicking on any field in table A will display table B. Clicking on any
> field in table B  will
> 1) change attributes of the field that was clicked in table A (for
> example, change bg color).
> 2) update the correct row in table A in the DB.
>
> My question is how do I refer to the original field (in table A)?
> How can I keep a reference to an element so that I can update its
> attributes later on?
>
> Thanks.

Reply via email to