Jquery and amendments 1.12.24

Asked

Viewed 25 times

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.

  • 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.

  • By chance you threshed the code and saw if the event of the click is being called?

  • Try to take out the Event.stopPropagation(); event I believe that after that your click works normally

  • 3

    I looked in the Cdns and only have 1.12.2 or 1.12.4.. has not 1.12.24. With the 1.12.4 everything works normally. You need to specify better

  • That’s right 1.12.4 but it doesn’t work.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.