/    Sign up×
Community /Pin to ProfileBookmark

need gallery help

NEED HELP with html gallery 3 hours ago #1
hi guys im doing website for my friend for free and i need some help with “gallery”
im editing web template and i need to add gallery to website

acctualy website look like this : https://i.imgur.com/96hdUiy.jpg
need to look like this: https://i.imgur.com/jBzklPh.jpg and after u click on “photo” → https://i.imgur.com/EN1artD.jpg

can anybody help me?
btw sorry for bad english
thanks

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@TumblersMar 13.2019 — I advise you to search for github, there are examples of code that you need.
Copy linkTweet thisAlerts:
@analyticMar 21.2019 — I have javaScript code that will do the slider portion. You will just need to add the HTML/CSS. Not sure if you're familiar with JS.

var sliderImages = document.querySelectorAll(".slide"),

arrowLeft = document.getElementById("arrow-left"),

arrowRight = document.getElementById("arrow-right"),

current = 0;

//clear images

function reset() {

for (i = 0; i < sliderImages.length; i++) {

sliderImages[i].style.display = "none";

}

}

//initialize slider

function startSlide() {

reset();

sliderImages[0].style.display = "block";

}

//show prev

function slideLeft() {

reset();

sliderImages[current - 1].style.display = "block";

current--;

}

//left arrow click

arrowLeft.addEventListener("click", function() {

if (current === 0) {

current = sliderImages.length;

}

slideLeft();

});

//right arrow click

function slideRight() {

reset();

sliderImages[current + 1].style.display = "block";

current++;

}

arrowRight.addEventListener("click", function() {

if (current === sliderImages.length - 1) {

current = -1;

}

slideRight();

});

startSlide();



You also would want a modal, which is easy to do.

Copy linkTweet thisAlerts:
@rootMar 21.2019 — [[2,3,4,8],[2,4]]
×

Success!

Help @necropro spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...