Jump to content

Вертикальное меню категорий на jquery Simpla 2.0

Recommended Posts

  • 8 months later...

не именно такое, но похожее:

<!-- Каталог -->
<script language="javascript">
function sub_menu(id,hide)
var ele = document.getElementById('submenu'+id);
var text = document.getElementById('subtext'+id);
if(hide, ele.style.display == "block"){
text.innerHTML = "+";
text.innerHTML = "-";
{function name=categories_tree}
{if $categories}
{foreach $categories as $c}
{if $c->visible}
<a {if $category->id == $c->id}class="selected"{/if} href="catalog/{$c->url}" data-category="{$c->id}">{$c->name}</a>
{if $c->subcategories}
<a id="subtext{$c->id}" href="javascript:sub_menu({$c->id}, 0)">+</a></li>
{if in_array($category->id, $c->children)}
{categories_tree categories=$c->subcategories}
<div style="display:none;" id="submenu{$c->id}">
{categories_tree categories=$c->subcategories}
{categories_tree categories=$categories}
<!-- Каталог End -->

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...