2017-04-20 09:47:13 +02:00

42 lines
1.2 KiB
Smarty
Executable File

{if count($sizes) > 0}
<div class="block_filter">
<div class="content">
<h4 class="open">{l s='Recherche par' mod='filtervp'} {$name}</h4>
<div class="content_filter">
<ul id="filters">
{foreach from=$sizes item=size}
<li>
<input type="checkbox" name="size" value="{$size.id_attribute}" id="size_{$size.id_attribute}">
<label for="size_{$size.id_attribute}">{$size.name}</label>
</li>
{/foreach}
</ul>
</div>
</div>
</div>
{/if}
<script>
{literal}
$(document).ready(function() {
$('.open').live('click', function(e){
e.preventDefault();
$('.block_filter .content').css({'position':'relative'});
var new_top = $('#privatesales_categories_block_left').position().top;
$(this).toggleClass('active');
$('.content_filter').toggle();
if($(this).hasClass('active') == true) {
new_top = $('#privatesales_categories_block_left').position().top + $('.block_filter .content_filter').height() + 25;
} else {
new_top = $('.block_filter').position().top + $('.block_filter').height();
}
$('#privatesales_categories_block_left').css({'top': new_top});
});
});
{/literal}
</script>