Uploading file using ajax

Uploading file using ajax

27.09.20
Let's upload a file to the server using ajax. Let's use axios. let formData = new FormData(), input = document.getElementById('file'); //"file" - key on server formData.append("file", input.files[0]); ...
Download file using ajax

Download file using ajax

08.06.20
The task of downloading a file using ajax may be more difficult than it seems at first glance. First option Send the file as base64. Substitute the href attribute. And programmatically click on the link.There may be ...
Infinite rotation css animation

Infinite rotation css animation

11.04.20
Endless rotation of the block clockwise using css animation .rotated{ animation-name: rotation; animation-duration: 3s; animation-iteration-count: infinite; animation-timing-function: linear; } @keyfra...
How to determine the direction of scroll on the page?

How to determine the direction of scroll on the page?

05.04.20
Using jQuery, you can do this: let lastScrollTop = 0; $(window).on('scroll', function(){ let top = $(this).scrollTop(); if (lastScrollTop > top) { console.log('top'); } else if (lastScr...
How to add a favicon to your website

How to add a favicon to your website

22.03.20
A favicon is a website icon. The easiest way to add it to the page is to put an icon with the name favicon.ico 16x16 pixels in the root of the site. Or set a path by writing one line in a section <head> <link...
[12 3 4 5  >>