how to alert message if element is visible current viewport?
<p>I need if element is visible current viewport alerts something message</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.wrapper {
  margin: auto;
  width: 400px;
  height: 300px;
  outline: 1px solid red;
  overflow-y: scroll;
}

.element {
  font-family: sans-serif;
  width: 100%;
  height: 50px;
  border-bottom: 1px solid grey;
}

.element.active{
  background: #ccc;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;div class="wrapper"&gt;
  &lt;div class="element"&gt;1&lt;/div&gt;
  &lt;div class="element"&gt;2&lt;/div&gt;
  &lt;div class="element"&gt;3&lt;/div&gt;
  &lt;div class="element"&gt;4&lt;/div&gt;
  &lt;div class="element"&gt;5&lt;/div&gt;
  &lt;div class="element"&gt;6&lt;/div&gt;
  &lt;div class="element"&gt;7&lt;/div&gt;
  &lt;div class="element active"&gt;I need when this is visible alert something&lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>