laggingreflex
laggingreflex

Reputation: 34627

Use variable in for loop as a selector?

Is something like this possible?

for my_class_selector in _aClass _bClass _cClass _dClass _eClass ... 
    .my_class_selector
        display none

Basically I want to create a bunch of classes with similar properties...

Upvotes: 4

Views: 817

Answers (1)

laggingreflex
laggingreflex

Reputation: 34627

Just needed the curly braces

for my_class_selector in _aClass _bClass _cClass _dClass _eClass
    .{my_class_selector}
        display none

Upvotes: 8

Related Questions