jomcdonald Posted May 21, 2014 Share Posted May 21, 2014 (edited) Alors voila, je souhaite intégrer un carousel afin que mes sous-catégories ne soit affichées que sur une seule ligne. J'ai trouvé le carousel jMyCarousel http://www.enova-tech.net/lab/jmycarousel/1 mais le problème c'est qu'il ne veut pas s'afficher sur mon site. Avec google chrome j'ai une erreur de type jquery is not defined. Donc si je capte bien jqery n'arrive pas à ce charger. Voila ce que j'ai fait: Fichier breadcrumb.tpl (car j'ai mis la partie sous-catégorie dans le fichier bredcrumb pour qu'elle puisse prendre toute la largeur de la page). <link rel="stylesheet" type="text/css" href="jmycarousel/css/jMyCarousel.css" /> <script type="text/javascript" src="jmycarousel/js/jMyCarousel.js"></script> {literal} <script> $(function() { $(".jMyCarousel").jMyCarousel({ visible: '100%' }); }); </script> {/literal} <!-- Breadcrumb --> {if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if} <div class="breadcrumb clearfix"> <a class="home" href="{$base_dir}" title="{l s='Return to Home'}"><i class="icon-home"></i></a> {if isset($path) AND $path} <span class="navigation-pipe" {if isset($category) && isset($category->id_category) && $category->id_category == 1}style="display:none;"{/if}>{$navigationPipe|escape:'html':'UTF-8'}</span> {if !$path|strpos:'span'} <span class="navigation_page">{$path}</span> {else} {$path} {/if} {/if} </div> {if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)} <div class="pull-right"> <strong> <a href="{$smarty.server.HTTP_REFERER|escape}" name="back"> <i class="icon-chevron-left left"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]} </a> </strong> </div> {/if} {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories" {if $p > 1} style="display: none" {/if}> <p class="subcategory-heading">{l s='Subcategories'}</p> <div class="jMyCarousel"> <ul class="clearfix"> {foreach from=$subcategories item=subcategory} <li> <div class="subcategory-image"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {if $subcategory.id_image} <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'subcategory_defaut')|escape:'html':'UTF-8'}" alt="" width="288" height="71" /> {else} <img class="replace-2x" src="{$img_cat_dir}default-medium_default.jpg" alt="" width="288" height="71" /> {/if} </a> </div> <h5><a class="subcategory-name" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:25:'...'|escape:'html':'UTF-8'|truncate:350}</a></h5> {if $subcategory.description} <div class="cat_desc">{$subcategory.description}</div> {/if} </li> {/foreach} </ul> </div> </div> {/if} <!-- /Breadcrumb --> Mes appels aux fichiers css et js sont correct donc je ne comprend vraiment pas ce qu'il se passe. Peut être un conflit jquery... Si quelqu'un s'y connait. Merci Edited May 21, 2014 by jomcdonald (see edit history) Link to comment Share on other sites More sharing options...
jomcdonald Posted May 21, 2014 Author Share Posted May 21, 2014 C'est bon, je suis arrivé à mon bonheur avec un autre carousel. J'ignore toujours pourquoi celui là ne marche pas donc je ne mets pas encore en résolu. Link to comment Share on other sites More sharing options...
slykereven Posted May 22, 2014 Share Posted May 22, 2014 Bonjour, Et par curiosité, quel carrousel au final ? Link to comment Share on other sites More sharing options...
jomcdonald Posted May 22, 2014 Author Share Posted May 22, 2014 flexisel. Tu peux voir le résultat ici: http://www.sexymoinscher.com/8-robes Link to comment Share on other sites More sharing options...
slykereven Posted May 22, 2014 Share Posted May 22, 2014 Ok, c'est sympa Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now