I know SASS allows for conditionals and I want to know if I could leverage this to do the following DOM manipulation instead of writing it in JQuery/JS.
The problem
In my HTML there is an element with an attribute data-tab-current
.
This attributes value is changing dynamically IE:
data-tab-current = "1"
data-tab-current = "2"
data-tab-current = "3"
data-tab-current = "4"
data-tab-current = "5"
When the value is 4 I want to change the CSS of another element. This element is not a child, sibling or descendant of data-tab-current = "4"
.
The logic for what I want to do looks like this:
if(dataTabCurrent == 4){
$("my-other-elment).css("display","none")
}