Commit f171bca0256f8114c6055aac90dd46fc19bd113c
Merge remote-tracking branch 'origin/master'
Showing
1 changed file
with
15 additions
and
12 deletions
Show diff stats
frontend/views/catalog/product.php
@@ -176,16 +176,19 @@ $this->registerJs (" | @@ -176,16 +176,19 @@ $this->registerJs (" | ||
176 | </div> | 176 | </div> |
177 | <div class="both"></div> | 177 | <div class="both"></div> |
178 | </div> | 178 | </div> |
179 | - | ||
180 | <?php | 179 | <?php |
181 | -//$this->registerJs (" | ||
182 | -// var productHash = window.location.hash; | ||
183 | -// productHash = productHash.replace('#','') | ||
184 | -// | ||
185 | -// var productUl = $('ul.product_mod li') | ||
186 | -// var productA = productUl.find('a#'+productHash) | ||
187 | -// productUl.removeClass('active') | ||
188 | -// productA.parent().addClass('active') | ||
189 | -// console.log(productA) | ||
190 | -// ", View::POS_READY, 'new_script'); | ||
191 | -//?> | ||
192 | \ No newline at end of file | 180 | \ No newline at end of file |
181 | +$this->registerJs (" | ||
182 | + var productHash = window.location.hash; | ||
183 | + productHash = productHash.replace('#','') | ||
184 | + | ||
185 | + var productUl = $('ul.product_mod li') | ||
186 | + var productA = productUl.find('a#'+productHash) | ||
187 | + productUl.removeClass('active') | ||
188 | + productA.parent().addClass('active') | ||
189 | + var dataLink = productA.attr('data-imageoriginal') | ||
190 | + var dataImg = productA.attr('data-image') | ||
191 | + | ||
192 | + $('#pic').attr('src',dataImg) | ||
193 | + $('#pic').parent().attr('href',dataLink) | ||
194 | + ", View::POS_READY, 'new_script'); | ||
195 | +?> | ||
193 | \ No newline at end of file | 196 | \ No newline at end of file |