I have made this page:
http://vasikaridis.gr/index2.php/?page_id=21725
At the left you can see a vertical slider. These are posts. And the thumbnail is the post's featured image.
At the right side, you can see a div which has as a background-image (css) the url of the last post from the left slider.
All I want is when someone clicks a thumbnail, to change the background-image src from the right div, to that clicked image.
Is this possible? Cause I have no idea how to fix this.
Thanks in advance!
Vagelis
EDIT: The url of the featured image is fetched with this code:
<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID, 'thumbnail') ); ?>
So then I do this:
<div id="fbg" style="background:url('<?php echo $url ?>') center center no-repeat;"></div>
But how am I suppose to make the code dynamically change the $url when I click the thumbnail?
See full code here: http://pastebin.com/18G0Pa9P