I have a promoted links webpart that I need to display only if a particular text string is displayed in another webpart on the same page. I can successfully capture the text string to a variable but my links webpart isn't being hidden.
Here is my code so far:
<script type="text/javascript">
var ProjectPhase = document.querySelector("table[summary='Project Info Log']").innerText.match(/Phase [1-9]/g)[0]
if (ProjectPhase == 'Phase 1')
{document.getElementById("MSOZoneCell_WebPartWPQ6").style.display = 'none'}
</script>
ProjectPhase
variable?