Trying to figure out how to create a link that will only activate when a specific value is present. Let's say I have a link like this:
a(class="nav-link" id="signal_" style="pointer-events: none" href="/goToStreamingPage") <i class="fas fa-signal"></i> #{signal}
input(hidden id="signalInput" value=signal)
How can I change the style pointer-events from "none" to "auto" based on a condition?
I attempted to do so with this code snippet:
$(function() {
let signals = document.getElementById('signalInput')
console.log(signals.value)
if(signals.value === "Live"){
signals.style.pointer-events = "auto";
console.log("Success!")
}
})
Unfortunately, this resulted in an error stating "Invalid left-hand side in assignment."