- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 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 › JQuery Set Anchor As Body Image
Hello Everyone,
I am trying to make a portfolio page where there is a ul and when you click on the link it will apply the anchor image to the body. I’ve tried searching but to no avail. Ideally I would like the jquery to say “get anchor src and apply that source to body” but I am too much of a newb to know how to do that.
http://codepen.io/mdrd88/pen/zJpIG
Thank you,
Much appreciated
Here you go!
It’s not perfect (I’d personally would do some sort of pre-loading of the image) and you might want different styles, but it should do what you’re looking for!
That is perfect! Thank you!
Welcome!
Okay, so I am still ignorant. But how can I get figure out how to get a fade effect/preload of the image?
Here is what I tried
That’ll work!
I’m usually in favour of actually preloading images with AJAX, but this should be fine for a less-advanced approach ;-)