- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2016 05:21 AM
I was not able to set background image on callerLabel however when i used $('label.incident.caller_id).down('label') it worked.What is the difference in the two???
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2016 10:07 AM
You're using prototype to target html elements on the page. $('label.incident.caller_id') would get you the element with id="label.incident.caller_id". Using .down('label') walks down the element tree from your original element to find the first label type element and target that element.
Prototype v1.7.3 API documentation | Element#down

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2016 10:07 AM
You're using prototype to target html elements on the page. $('label.incident.caller_id') would get you the element with id="label.incident.caller_id". Using .down('label') walks down the element tree from your original element to find the first label type element and target that element.
Prototype v1.7.3 API documentation | Element#down