I think you got the jist of it. Syntax looks just fine. The filter
isn't necessary, but I doubt it will be depreciated in future
releases.
       function getRecord(id,URL){
               jQuery("#ResultsTable tr .selected").removeClass("selected");
               jQuery("#"+id).addClass("selected");
...

~Sean

On 11/2/07, Doug <[EMAIL PROTECTED]> wrote:
>
> Hello All, I am a newbie and am trying to learn jQuery. I created this
> function:
>
>         function getRecord(id,URL){
>                 jQuery("#ResultsTable
> tr").filter(".selected").removeClass("selected");
>                 jQuery("#"+id).addClass("selected");
> .....
>
> It goes on to return a record.
>
> The first line above removes a highlighted (selected) rows in a table.
> The next line highlights the currently selected row. This works but am
> worried that it is not the best coding by using "#ResultsTable tr" and
> that this type of naming become illegal in a future version of jQuery.
>
> Any suggestions? Or is there a cleaner way to bind a selected row from
> a master table to  detail record(s).
>
>

Reply via email to