ERRO Cannot call method 'função' of null
Hey Folks,
Estou tendo o erro:
Uncaught TypeError: Cannot call method 'mouseover' of null
Coloquei meu script após o bloco do layout e mesmo assim não solucionou o problema.
Segue meu código
<div class="carousel-height"> </div>
<div class="jcarousel-skin-tango">
<div class="jcarousel-container">
<div class="jcarousel-clip">
<ul id="carousel" class="products-carousel">
<?php endif ?>
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
<div class="border"> <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(170,170); ?>" width="170" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
<div class="carousel-info">
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
<?php /*?><?php echo $this->getPriceHtml($_product, true) ?><?php */?>
</div>
</div>
</li>
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
</ul>
</div>
<div disabled="disabled" class="jcarousel-prev jcarousel-prev-disabled"> </div>
<div class="jcarousel-next"> </div>
</div>
</div>
<?php endif ?>
<?php endforeach ?>
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
<?php endif; ?>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery('#carousel').jcarousel({
wrap: 'circular',
scroll: 1,
auto: 2,
initCallback: function(jc,state) {
if (state == 'init') {
jc.startAutoOrig = jc.startAuto;
jc.startAuto = function() {
if (!jc.paused) {
jc.startAutoOrig();
}
}
jc.pause = function() {
jc.paused = true;
jc.stopAuto();
};
jc.play = function() {
jc.paused = false;
jc.startAuto();
};
$('li.jcarousel-item').mouseover(function(){
jc.pause();
});
$('li.jcarousel-item').mouseover(function(){
jc.play();
});
jc.play();
}
}
});
});
</script>Discussão (3)
Carregando comentários...