P
P
PiterBacktner2016-11-30 10:08:51
css
PiterBacktner, 2016-11-30 10:08:51

How to highlight the selected item?

Such a problem. CMS Prestashop. There are attributes on the product page, in this value it is "size". When you hover over the selected size, the selected size is highlighted, that is, the box with the inscription "48" becomes black. But if you select it, click on this size, then the selection does not happen. He remains the same as everyone else, white. I really ask for help. It is necessary that when choosing a size, the cell with this value remains black.
Site page example https://ddclothes.ru/index.php?id_product=234&cont...
Page code pastebin.com/QYxLCG69 328 line attribute code
DUvzwFD5ueA.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ildar Gizetdinov, 2016-11-30
@PiterBacktner

line 356

<li{if ($group.default == $id_attribute)} class="active"{/if}>
    <input onchange="$(this).parent().parent().find('li').removeClass('active').find('input:checked').parent().addClass('active')" type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} />
    <span>{$group_attribute|escape:'html':'UTF-8'}</span>
</li>

add in styles
было #attributes .attribute_list ul li:hover

стало #attributes .attribute_list ul li:hover, #attributes .attribute_list ul li.active

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question