How to completely disable a pagination link
<p>When i click the disabled link it takes me to the top of the page. what I do for this not happen? I tried it with a javascript code and it did not work and this css did not work too. sorry about my english </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.pagination ul {
  display: inline-block;
  padding: 0;
  margin: 0;
}

.pagination li {
  display: inline;
}

.pagination li a {
  color: black;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
}

.pagination li.active a {
  background-color: red;
  color: white;
}

.pagination li:hover.active a {
  background-color: red;
}

.pagination li:hover:not(.active) a {
  background-color: #ddd;
  color: black;
}

&amp;.disabled,
&amp;[disabled] {
  cursor: not-allowed;
  pointer-events: none; // Future-proof disabling of clicks
  .opacity(.65);
  .box-shadow(none);
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container text-center"&gt;
  &lt;ul class="pagination"&gt;
    &lt;li class="disabled"&gt;&lt;a href=""&gt;«&lt;/a&gt;&lt;/li&gt;
 &lt;li class="active"&gt;&lt;a href="index.html"&gt;1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="videos2.html"&gt;2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="videos2.html"&gt;»&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>