The script was written for this structure:
<div class="catalog"> <img src="img/name12.jpg"/> <a href="cat/tovar1.html">товар 1</a> </div> And I have this:
<div class="title"> <h2 itemprop="name"><a href="cat/tovar1.html" itemprop="url">товар 1</a></h2> </div> <div class="miniature"> <img itemprop="image" src="img/name12.jpg"/> </div> Here is a script that needs a little tweak:
jQuery(document).ready(function(){ $('.catalog img').live('click', function() { document.location.replace($(this).parent().find('a').attr('href')); }); }); Thank.