I was trying to get ID of current section. Here is the code snippet what I tried:

```
$(document).on('scroll', function() {
    alert($(this).$("section").attr('id'));
}

```

But found no result. How can I get the **id** of a section while scrolling?