# Timeline z-index

**URL:** <https://meta.discourse.org/t/timeline-z-index/50797>\
**Category:** Development\
**Created:** [28 Septiembre, 2016 14:43 UTC](https://meta.discourse.org/t/timeline-z-index/50797 "2016-09-28T14:43:24Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![kgish](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgish/32/121131_2.png) [@kgish](https://meta.discourse.org/u/kgish)\
**Post date:** [28 Septiembre, 2016 19:39 UTC](https://meta.discourse.org/t/timeline-z-index/50797/5 "2016-09-28T19:39:55Z")

</div>

Here’s the code:

```kavascript
// TODO: The annotator widget appears behind the timeline and upper caption.
var timeline_container = $('.timeline-container');
if (timeline_container.length) {
    if (annotator_widget.length) {
        var z_timeline_container = timeline_container.css('z-index'),
        p_timeline_container = timeline_container.css('position'),
        z_annotator_widget = annotator_widget.css('z-index'),
        p_annotator_widget = annotator_widget.css('position');
        annotator_widget.css('z-index', ""+(parseInt(z_timeline_container) + 1));
        var z2 = annotator_widget.css('z-index');
        console.log('annotationEditorShown: z-index => timeline_container="'+z_timeline_container+'", \
position="'+p_timeline_container+'", z_annotator_widget="'+z_annotator_widget+'" => "'+z2+'", \ 
position="'+p_annotator_widget+'"');
    } else {
        console.error('annotationEditorShown: could not find annotator widget');
    }
} else {
    console.log('annotationEditorShown: no timeline detected');
}

```

and here’s the output:

```plaintext
annotationEditorShown: z-index => timeline_container="499", \
    position="absolute", z_annotator_widget="auto" => "500", \
    position="absolute"

```

---

_[View the full topic](https://meta.discourse.org/t/timeline-z-index/50797)._
