2015-07-22 4 views
1

Я изо всех сил пытаюсь настроить carouFredSel. Я делаю все правильно - все ссылки работают. Я добавляю это в интернет-магазине, используя шаблоны smarty. Я получаю эту ошибку в хромированной консоли:carouFredSel не является функцией ошибки

Uncaught TypeError: jQuery(...).carouFredSel is not a function

руководитель секции header.tpl:

<!-- jQuery -->  
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" type="text/javascript"></script> 
<!-- CarouFredSel --> 
<script src="http://serwer1449841.home.pl/autoinstalator/wordpress/wp-includes/js/jquery.carouFredSel-6.2.1.js" type="text/javascript"></script> 

{literal} 
    <script type="text/javascript"> 
    jQuery(function() { 
      jQuery('#carousel').carouFredSel({ 
       items    : 2, 
       direction   : "up", 
       scroll : { 
        items   : 1, 
        easing   : "elastic", 
        duration  : 1000, 
        pauseOnHover : true 
       } 
      }); 
     }); 
    </script> 
{/literal} 

footer.tpl:

<div id='carousel'> 
    <img src='http://example.com/img1.png' width='105' /> 
    <img src='http://example.com/img2.png' width='110' /> 
    <img src='http://example.com/img3.png' width='105' /> 
    <img src='http://example.com/img4.png' width='120' /> 
    <img src='http://example.com/img5.png' width='105' /> 
    <img src='http://example.com/img6.png' width='200' /> 
</div> 

CSS

#carousel img { 
    padding: 16px 10px 14px 10px; 
} 

#carousel { 
    width: 1178px; 
    height: 126px; 
    margin: 0 auto; 
} 

Путь к caroufredsel правильный, что мне не хватает?

ответ

-1

У меня был один и тот же вопрос, и этот ответ помог мне https://bugzilla.mozilla.org/show_bug.cgi?id=879298#c3

<ol> 
 
    <li>jQuery loaded into DOM</li> 
 
    <li>caroFredSel plugin is attached to jQuery in DOM</li> 
 
    <li>Something is causing ANOTHER instance of jQuery to load into the DOM, overwriting the previous $ object.</li> 
 
    <li>When caroFredSel() is called on the $ object in carousel.js, since it is a new jQ object, the method doesn't exist.</li> 
 
</ol>

Надежда это поможет вам слишком

Смежные вопросы