0
Good morning friends,
I have a Jquery code for a "page up" function, but it doesn’t work due to my version of Jquery which is 1.12.24 and I can’t update it.
Is there any way to adapt the code with accepted functions in this version? Does anyone remember what did not yet exist? Follow Cod:
<script>
$(document).ready(function() {
$('.list_options.hotels .hotel_block .rooms_options > .price').click(function(event) {
event.preventDefault();
$('html, body').animate({scrollTop: 0}, 1000);
event.stopPropagation();
});
});
What’s the problem? Any messages on the console.
– Renan Gomes
Hi Renan, actually does not present error, just does not work. I believe it is because of the version, since the code itself is correct, and has already been reproduced externally.
– Gabriel Salomão
By chance you threshed the code and saw if the event of the click is being called?
– Jean Gatto
Try to take out the Event.stopPropagation(); event I believe that after that your click works normally
– Danyel Pires
I looked in the Cdns and only have
1.12.2
or1.12.4
.. has not1.12.24
. With the1.12.4
everything works normally. You need to specify better– fernandosavio
That’s right 1.12.4 but it doesn’t work.
– Gabriel Salomão