Færdiggjort

Small JS Coding sidekick needed

Im am not too much into js and need a small extension of a given js. My JS folds up a Laptop by getting seperate images on scroll. Just like here [login to view URL]

The Job must be done today

Script:

const html = [login to view URL];

const canvas = [login to view URL]("macbook");

const context = [login to view URL]("2d");

const frameCount = 121;

const currentFrame = index => (

`[login to view URL]${[login to view URL]().padStart(4, '0')}.jpg`

)

const preloadImages = () => {

for (let i = 1; i < frameCount; i++) {

const img = new Image();

[login to view URL] = currentFrame(i);

}

};

const img = new Image()

[login to view URL] = currentFrame(1);

canvas.width=1096;

canvas.height=728;

img.onload=function(){

[login to view URL](img, 0, 0);

}

const updateImage = index => {

[login to view URL] = currentFrame(index);

[login to view URL](img, 0, 0);

}

[login to view URL]('scroll', () => {

const scrollTop = [login to view URL];

const maxScrollTop = [login to view URL] - [login to view URL];

const scrollFraction = scrollTop / maxScrollTop;

const frameIndex = [login to view URL](

frameCount - 1,

[login to view URL](scrollFraction * frameCount)

);

requestAnimationFrame(() => updateImage(frameIndex + 1))

});

preloadImages()

HMTL

<canvas id="macbook" />

The TASK:

1. If scrolled up image 90 is reached add class to body "reached-90" and add class to #macbook "reached-open90". Remove classes if scrolled down to a lower number image.

2. If scrolled up image 110 is reached add class to body "reached-110" and add class to #macbook "reached-open110". Remove classes if scrolled down to a lower number image.

3. If scrolled up image 121 is reached add class to body "reached-121" and add class to #macbook "reached-open121". Remove classes if scrolled down to a lower number image.

I have jQuery on Page.

Delivery: Send the altered script. I will build it into page.

The Job might be interesting as I want to do more Apple like interactions and animations infuture on my page

Evner: JavaScript, jQuery / Prototype

Se mere: small games coding, need small website, need small mac app, need small illustrations, need small software projects, need small program, need small magazine designed, need small graphic design job, language small project coding, small game coding, small indian web company needed, small jobs coding, need small application, need small call center, need small website built, need small flv video, need small application developed, small application coding wp7, need small java projects

Om arbejdsgiveren:
( 7 bedømmelser ) Kiel, Germany

Projekt ID: #31839787

Tildelt til:

mykrsolovlo

Hello! I am specialized in website design and development and excited for the opportunity to work with you in accomplishing your goals. I have 7+ years for Web development, Web Design. I have rich experience for Python Flere

€24 EUR / time
(0 bedømmelser)
0.0

9 freelancere byder i gennemsnit €47/timen for dette job

ArkssTech

Hey Manager!! We checked for your project and interested in your project. Project: Small JS Coding sidekick needed I am skilled full stack programmer with skills including jQuery / Prototype and JavaScript.
 I have do Flere

€17 EUR / time
(16 bedømmelser)
6.0
shashank9090

Hello, I have read your job "Small JS Coding sidekick needed" We are a team of expert web and mobile app developers who can develop any module/functionality from scratch. Technologies we work: Angular 9, ReactJS Reac Flere

€17 EUR / time
(14 bedømmelser)
5.5
swamyvaditya

Dear Sir, I'm well versed in Javascript, jQuery, Canvas, CSS, and other related technologies. I can assist you with the Javascript/Canvas/Animation coding task. Please contact me to discuss further details. Best Flere

€12 EUR / time
(10 bedømmelser)
4.6
younesboulahya

hi, i am an engineer and expert full stack developer, i can help you with that, contact me

€15 EUR / time
(4 bedømmelser)
2.9
oleksdevr

Should choose right candidate to save the time and money! CAN complete your task with the best quality in short period! Hi. It is only easy for skilled freelancer. Let us discuss soon.

€300 EUR / time
(3 bedømmelser)
3.0
shywaewajane

Hi ✔️Reading the job description, it seems that you might be looking for a Javascript developer. We are couple of girls team. After all, we will bring you competitive and relevant result that you're looking for and Flere

€15 EUR / time
(2 bedømmelser)
2.7
rbilozor

I'm confident in your job because I'm a JS and JQUERY expert. I assure you to deliver the perfect result for you in a few hours. Lets discuss more details in chat.

€13 EUR / time
(3 bedømmelser)
2.2
youshaarif

Hi, I showed a keen interest in your project as I hold notable experience in JS, also I hold diverse experience of integrating various 3rd party libraries JS, but I would love to hear more from you. If it seems feasibl Flere

€12 EUR / time
(0 bedømmelser)
0.0