how to make background image move mmousemove jquery
how to make background image move mmousemove with jquery:
$('background-section').mousemove(function (e) {
// values: e.clientX, e.clientY, e.pageX, e.pageY
// console.log(moveX = (e.pageX));
let moveX = (e.pageX * -1 / 20);
let moveY = (e.pageY * -1 / 15);
$(this).css('background-position', moveX + 'px ' + moveY + 'px');
});
Also in JavaScript:
- Create a 'uniqueWords' function that accepts a string 'str' and returns an array of all the unique words in that string.
- moving letters animation javascript
- jquery make readonly textbox
- js split string every n characters
- npm run test:coverage command in jest
- loop over json javascript
- vuejs directives list
- nestjs start server
- diffrence of two objects javascript
- jsf c:set date
- js get time in am
- express request path
- not equal to in js
- js array last element
- js create array from for loop
- what does function setup() do in javascript
- convert table to excel reactjs
- get text in select jquery
- tochararray in javascript
- factorial javascript function
- draw point p5js
- current date in javascript
- how to use cordova screen shot
- stopwatch with javascript