When choosing a picture, the link should not work, but it still throws to another page. The second day I fight. Please tell me what could be the snag?
I work in PhpDesigner8 . Because in WebStorm 'e issues on function(e)
unused parameter function.
$(document).ready(function() { $('#small a').click(function(e) { $('#big img').hide().attr('src', $(this).attr('href')); $('#big img').load(function() { $(this).fadeIn(2000); }); e.preventDefault(); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <div id="gallery"> <div id="big"> <img src="images/gal/start.jpg" alt="Старт" /> </div> <div id="small"> <a href="images/gal/1.jpg"> <img src="images/gal/1_mini.jpg" alt="Миниатюра 1" /> </a> <a href="images/gal/2.jpg"> <img src="images/gal/2_mini.jpg" alt="Миниатюра 2" /> </a> <a href="images/gal/3.jpg"> <img src="images/gal/3_mini.jpg" alt="Миниатюра 3" /> </a> <a href="images/gal/4.jpg"> <img src="images/gal/4_mini.jpg" alt="Миниатюра 4" /> </a> </div> </div>