Hide Annotations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2011 05:08 PM
I've gotten the element ID and tried doing a .style.display='none'; This seemed like a long shot, so I'm not surprised it didn't work. Does anyone know how to conditionally show/hide an annotation?
Thanks!
Matt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2011 05:52 PM
Have you tried this?
Hide Annotation with Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2011 06:56 AM
Yea, I'm just not smart enough to figure out how to do this 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2011 04:35 PM
If you are doing an Annotation, and selecting "Custom" Annotation Type, you will be given a text box where you have probably put in some HTML to display. As an example, if you are putting in some HTML like this, give the top most tag an id.
<div id="myid">
<p>This is what I want to display in my annotation.</p>
</div>
Then you can create a client script, with whatever condition you want, to display or not display this annotation.
Client Script - would be an onLoad client script.
function onLoad() {
var mine = $('myid'); //This selects the element with the ID you have specified.
//This if statement would be whatever condition you want.
//I specified if "mine" (or the element selected) is there, run my code.
if (mine) {
//This is a simple way to hide the element selected.
mine.hide();
}
}
Hopefully this helps to see it visually
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2011 10:22 AM
Can you give a "Line Separator" annotation a name so it can be hidden as well?
I've tried:
div id="ann2"
with the comment out tags around it
but it puts spaces in the middle of the line:
___________ __________________