Forum How do I...?

Hiding elements from inside a prince-script js function

abaker87
Is it possible to hide an element from inside a prince-script js funtion.

ie.
Javascript:
function getTOAPageString( counterTarget, nodeId, shortcode){
    if(nodeId=='temp-id'){
    
       document.getElementById(nodeId).style.display = 'none'; 
       return '';
    }
    return counterTarget;
}

Css:
.toa-citation .page{

    content: prince-script(getTOAPageString, target-counter(attr(href), page), attr(id), attr(data-shortcode));
}
mikeday
Why not just do it directly in CSS:
#temp-id { display: none }

Or in a JavaScript function called from the onload event?