K
K
Kuper1322017-09-30 00:21:10
css
Kuper132, 2017-09-30 00:21:10

How to add a class to jade (in a loop)?

mixin products-item(classname, ...items)
div(class='product product-item_' + classname)
each item in items
div(class='product-item__' + item)= item
+products-item('first -guitar','Nylon','140')
It is necessary to be able to add an additional class to the class when adding, but now it is the name of the element and this is not suitable, I want to set my class and I need one to be name another price
for example
+products-item(' first-guitar',{name:'class-name'},{price:class-price},'Nylon','140')

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question