List Info

Thread: Trying to highlight a row.




Trying to highlight a row.
user name
2008-01-21 11:17:30
Hi.

I'm trying to quickly test a mouse over and couldn't get
table row
bordering to work.

$$('tbody th').invoke('setStyle',{border:'1px solid red'});

and

$$('tbody td').invoke('setStyle',{border:'1px solid
green'});

both work, but ...

$$('tbody tr').invoke('setStyle',{border:'1px solid
blue'});

doesn't.


If I issue the command in FireBug's console, I get an array
of all the
rows, but no border is set.

Any ideas?


-- 
-----
Richard Quadling
Zend Certified Engineer : 
http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever
giants!"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffsgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=
en
-~----------~----~----~----~------~----~------~--~---


Re: Trying to highlight a row.
country flaguser name
United States
2008-01-21 11:41:25
Richard Quadling wrote:
> Hi.
>
> I'm trying to quickly test a mouse over and couldn't
get table row
> bordering to work.
>
> $$('tbody th').invoke('setStyle',{border:'1px solid
red'});
>
> and
>
> $$('tbody td').invoke('setStyle',{border:'1px solid
green'});
>
> both work, but ...
>
> $$('tbody tr').invoke('setStyle',{border:'1px solid
blue'});
>
> doesn't.
>
>
> If I issue the command in FireBug's console, I get an
array of all the
> rows, but no border is set.
>
> Any ideas?
>   
In my tests, border on tr within css or javascript has no
effect.  
You'll have to add classes to your td's and tr's.

<table>
  <tr>
    <td class="cell_left">Left
cell</td>
    <td class="cell_middle">Middle
cell</td>
    <td class="cell_middle">Middle
cell</td>
    <td class="cell_right">Right
cell</td>
  </tr>
</table>

$$('tbody td.cell_left').invoke('setStyle',
  {border:'1px solid green', borderRight:'none'});
$$('tbody td.cell_middle').invoke('setStyle',
  {borderTop:'1px solid green', borderBottom:'1px solid
green'});
$$('tbody td.cell_right').invoke('setStyle',
  {border:'1px solid green', borderLeft:'none'});


- Ken Snyder 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffsgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=
en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )