Answer the question
In order to leave comments, you need to log in
How to make preventDefault work in firefox?
Hello everyone
There is such a simple design. But for some reason it does not work in Firefox, there is a standard click. In what way can this be fixed?
<div class="com_cloud">
<h5 class="com_cloud_text"><a onclick='OpeU()' href="#">Войдите и оставьте свой отзыв</a></h5>
</div>
<script async type="text/javascript">
function OpeU() {
event.preventDefault();
var speed = 1000;
// место скролла
var top = $('#scroll_point')
$('html, body').animate({scrollTop: top}, speed);
OpenLoginMenu()
}
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question