Sujet fermé
Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

[Résolu]Scroll lien ancre
#6

Bonjour,

Je reviens donc avec du concret.

Voici le lien vers mon site : http://www.carryall.fr

Voici le lien vers le plugin javascript utilisé pour scroller : http://tympanus.net/codrops/2010/06/02/s...th-jquery/

Exemple sur lequel je me suis basé : http://tympanus.net/Tutorials/WebsiteScr...tical.html

Je vous mets également le code de mon menu de navigation, sachant que j'utilise boostrap 3.3.5.


Code :
[== HTML ==]
{strip}

{if $count > 0}

    <ul class='nav navbar-nav navbar-right' role='menu'>
    {* if using cmsms lower then 1.11 change foreach below to {foreach from=$nodelist item='node'} *}
    {foreach $nodelist as $node}
        
        {* if depth is greater then previous we need ul *}
        {if $node->depth > $node->prevdepth}
            {repeat string="<ul class='dropdown-menu' role='menu'>" times=$node->depth-$node->prevdepth}  
        {* if depth is lower then we have to close unordered list *}
        {elseif $node->depth < $node->prevdepth}
            {repeat string='</li></ul>' times=$node->prevdepth-$node->depth}
            </li>
        {elseif $node->index > 0}
            </li>
        {/if}
        
        {* is menu item current? *}
        {if $node->current == true}
        
            <li class='active{if $node->parent == true || $node->haschildren == true}{if $node->depth > 1} dropdown-submenu{else} dropdown{/if}{/if}'>
                <a href='{$node->url}' {if $node->parent == true || $node->haschildren == true}class='dropdown-toggle {$node->alias}' data-toggle='dropdown' data-target='#'{else}class='{$node->alias}'{/if}{if $node->target != ''} target='{$node->target}'{/if}>{$node->menutext}{if ($node->parent == true || $node->haschildren == true) && ($node->depth < 2)} <b class='caret'></b>{/if}</a>        
        
        {* is menu item parent and not sectionheader? *}
        {elseif $node->parent == true && ($node->type != 'sectionheader' && $node->type != 'separator')}
        
            <li class='{if $node->parent == true || $node->haschildren == true} active{if $node->depth > 1} dropdown-submenu{else} dropdown{/if}{/if}'>
                <a href='{$node->url}' data-toggle='dropdown' data-target='#' class='dropdown-toggle active {$node->alias}'{if $node->target != ''} target='{$node->target}'{/if}>{$node->menutext}{if ($node->parent == true || $node->haschildren == true) && ($node->depth < 2)} <b class='caret'></b>{/if}</a>        
      
        {* is menu item a sectionheader? *}
        {elseif $node->type == 'sectionheader' && ($node->parent == true || $node->haschildren == true)}
            <li class='sectionheader {if $node->depth > 1} dropdown-submenu{else} dropdown{/if}'>
                <a href='#' data-toggle='dropdown' class='dropdown-toggle {$node->alias}{if $node->current == true} active{/if}'>{$node->menutext}{if ($node->parent == true || $node->haschildren == true) && ($node->depth < 2)} <b class='caret'></b>{/if}</a>
        
        {* and sectionheader has no children? *}
        {elseif $node->type == 'sectionheader' && $node->haschildren == false}
            <li class='sectionheader nav-header'>
                {$node->menutext}            
        
        {* should a menu item be separated? *}
        {elseif $node->type == 'separator'}
            <li class='divider'>
        
        {else}
            <li{if $node->parent == true || $node->haschildren == true} class='{if $node->depth > 1}dropdown-submenu{else}dropdown{/if}'{/if}>
                <a href='{$node->url}' {if $node->parent == true || $node->haschildren == true}class='dropdown {$node->alias}'{else}class='{$node->alias}'{/if}{if $node->target != ''} target='{$node->target}'{/if}>{$node->menutext}{if ($node->parent == true || $node->haschildren == true) && ($node->depth < 2)} <b class='caret'></b>{/if}</a>
        {/if}
        
    {/foreach}

    {repeat string='</li></ul>' times=$node->depth-1}</li>
    </ul>

{/if}

{/strip}


Vous verrez donc que sur la gauche du site se trouve deux liens (page 2 et Scroll down) où le scroll fonctionne correctement.

J'espères que cela vous aidera à m'orienter vers une solution.

D'avance merci.
Sujet fermé


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)