javascript - Clicking on thumbnail doesn't update main image -
$('#minipics img').click(function(){ var url = $(this).attr('src'); $('#mainpic img').attr('src', url); });
i have little code image gallery. want insert jquery tabs under gallery.
so have html it:
<div id="tabs"> <ul> <li><a href="#tabs-1">პროდუქტის აღწერა</a></li> <li><a href="#tabs-2">პრომო ვიდეო</a></li> <li><a href="#tabs-3">მსგავსი პროდუქტი</a></li> <li><a href="#tabs-4">კომენტარები (0)</a></li> </ul> <div id="tabs-1" class="ui-widget-content1"> <p>1</p> </div> <div id="tabs-2" class="ui-widget-content1"> <p>2</p> </div> <div id="tabs-3" class="ui-widget-content1"> <p>3</p> </div> <div id="tabs-4" class="ui-widget-content1"> <p>4</p> </div> </div>
also i'm inserting table ui.
when i'm inserting funciton:
$(function() { $( "#tabs" ).tabs(); });
tabs work, gallery doesn't work. may problem here? in advanced
this gallery html:
<div id='mainpic'> <img src="img/a1.png"> </div> </div> <div id='minipics'> <img src="img/a1.png"> <img src="img/a2.png"> <img src="img/a3.png"> <img src="img/a4.png"> <img src="img/a5.png"> <img src="img/a6.png"> <img src="img/a7.png"> </div>
Comments
Post a Comment