Home>
Implementation to make in-page links smooth animation
I tried to implement the following source with Jquery, but I get the error statement $(...). Animate is not a function.
Please teach me what to do
What I tried
-Check that the Jquery file is not slim (because it seems that animation functions cannot be used)
$('# navigation ul li a'). click (function () {
var speed = 400;
var href = $(this) .attr ("href");
var target = $(href == "#" || href == ""?'html': href);
var position = target.offset (). top;
$('body, html'). animate ({scrollTop: position}, speed,'swing');
return false;
});
-
Answer # 1
Related articles
- laravel - i get the error call to a member function load () on null
- parameters - about error when calculating python sarimx parameter optimization
- api - please tell me about the bind () function and listen () function of socket
- about the c language scanf function
- ruby on rails 5 - about lint/syntax error of rubocop
- ruby - about the error content displayed in "rails" rspec
- error in callback function in php class
- about unpickling error in python socket communication
- vba - about index error
- about php date function
- python - about openpyxl error avoidance
- php - about bookmark function on the web
- ruby - about error of update action when nesting
- ruby on rails 6 - about rails error "wrong number of arguments (given 1, expected 0)"
- about management screen error in wordpress version 55
- i have a question about the uwsc deletefile function
- dart: about the error that occurs when declaring a list with const
- java - about the anonymous function removelistener
- about python pip install error
Trends
- python - you may need to restart the kernel to use updated packages error
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- javascript - how to check if an element exists in puppeteer
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to check the type of a shell script variable
- i want to call a child component method from a parent in vuejs
I'm saying that $(...). Animate is not a function
Looking at the line, I'm trying to get this to run, but try to see if it's correct