Changing images on click?

Hello I was faced with this challenge, there is a block on the floor of the screen and menus at the top, when clicking on a link from the menu tightens at the url of the new image on the background block, the question is how this process is to animate but with the animation?

PS, can I somehow messed with the performance, so if anyone can advise an alternative solution I would be very grateful!

here's the menu!
<a href="javascript:l_image ('')">Elegance</a>
<a href="javascript:l_image ('')">Creation</a>
<a href="javascript:l_image ('')">Family Office</a>
<a href="javascript:l_image ('')">Experience</a>

here is the block where poset picture!
<div class="img-container"><img src="" name="example_img" alt></div>

but the script itself
function l_image (a) {
June 14th 19 at 20:39
1 answer
June 14th 19 at 20:41
<a href="javascript:l_image ('')">Elegance</a>
a great example of*nocoda. Don't do that.

the url to your new picture on the background of the block

<img src="" name="example_img" alt>

where's the background? If just the image src to change that:

var imgurl = $(this).data('url');

HTML change this:

<a href="#" data-url="">Elegance</a>
<div class="img-container">
 <img src="" alt id="someimage">
All great works, thank you, and how to tie the animation correctly?? - rachelle_Wuckert commented on June 14th 19 at 20:44
and that to animate it? animation of what, replace one picture to another? One leaves another arrives? - lily.Kozey commented on June 14th 19 at 20:47
Well , in General, and so, the main thing that looked more alive - rachelle_Wuckert commented on June 14th 19 at 20:50

Find more questions by tags JavaScriptCSSjQuery