- This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
Viewing 12 posts - 1 through 12 (of 12 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › need to display an image from gallery to open in another div after click
hello,
just need any one to help me
i have 20 div for images and videos
when i click on any div display the image or video in amain div
also need this main div to display the first image or video as a default
sry, but iam beginner and need ur help :)
Thanx.
Show us some code please, preferably a Codepen demo…
thanx dear for your replay ..
but sry, i searched throuh codepen for a code similar to my design but i didn’t find ..
this is the design which i need to do ..
http://files.fm/g/lwpjufh#aa/example.png
thanx again :)
Well, it shouldn’t be too difficult and I’d write up some code but I’d have to know what elements to base it on…
$(function() {
$('.element').click(function() {
var path = this.src;
if (path) $('#mainelement').attr('src', path);
});
});
Just do a search for “Thumbnail Gallery”…that should get you loads of options.
elements will be images or video
No code no glory. Demo or it didn’t happen.
Ahhh…you’d dived to the heart of the matter..
believe me if i have code i will do what i want alone :D
but my problem that i need code
also i search for long time for a code suitable for my design but i didn’t find
so,, iam here need ur help .. need some code :D
i have 20 div for images and videos
my design
So where are they then? Not that I’m begging to see…
Feeding the vampire is never a wise idea.
True enough, I’ll hang up the garlic instead.