To delay the initial display of a sticky note, you can wrap the initialization code for it in a setTimeout() function, for example:
Code:
setTimeout(function(){
alwaysOnTop.init({
targetid: 'examplediv',
orientation: 3,
position: [5, 10],
fadeduration: [1000, 1000],
hideafter: 15000
})
}, 1000)
The part in red is new, where 1000 denotes a 1 second delay.
To relaunch a sticky note using a link for example, firstly, you'll want to cache the setting for it inside a JavaScript variable. Using the above example as an example, the below caches its settings:
Code:
<script type="text/javascript">
var mysetting={
targetid: 'examplediv',
orientation: 3,
position: [5, 10],
fadeduration: [1000, 1000],
hideafter: 15000
}
</script>
Then to create a link that relaunches this sticky note, call alwaysOnTop.init() and pass in this setting variable:
Code:
<a href="javascript:alwaysOnTop.init(mysetting)">Launch sticky note</a>
Bookmarks