# How to highlight or get the child div id?

**URL:** <https://www.ruby-forum.com/t/how-to-highlight-or-get-the-child-div-id/150717>\
**Category:** Rails\
**Created:** [October 12, 2008, 12:40am UTC](https://www.ruby-forum.com/t/how-to-highlight-or-get-the-child-div-id/150717 "2008-10-12T00:40:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Innovia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a183cd/32.png) [@Innovia](https://www.ruby-forum.com/u/Innovia)\
**Post date:** [October 12, 2008, 12:40am UTC](https://www.ruby-forum.com/t/how-to-highlight-or-get-the-child-div-id/150717/1 "2008-10-12T00:40:44Z")

</div>

Hi

I am trying to highlight the child div of attendees\_box which is the  
attendee\_id

so far this is my code

```
page.replace_html "attendees_box_#{@event.id}", :partial =>
"attendees", :collection => @event.members
page.visual_effect(:highlight, "attendees_box_#{@event.id}
[attendee_id_#{@member.id}]")
```

I can highlight the parent div with no problem, but when i try to  
highlight attendee\_id div i get an error

RJS error:

[object Object]

what is the correct syntax to get to the child element?

---

<div class="post-metadata">

**Author:** ![Innovia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a183cd/32.png) [@Innovia](https://www.ruby-forum.com/u/Innovia)\
**Post date:** [October 12, 2008, 1:27am UTC](https://www.ruby-forum.com/t/how-to-highlight-or-get-the-child-div-id/150717/2 "2008-10-12T01:27:31Z")

</div>

On Oct 11, 9:13 pm, Innovia [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> page.visual\_effect(:highlight, “removed\_email\_address@domain.invalid}  
> [removed\_email\_address@domain.invalid}]”)

So what are the dom ids of the elements you are trying to highlight  
and what is the javascript that is generated?

Fred
