Passing paramaters through shortcode
-
Hi, I have a simple snippet like:
<div id="gvk_04" style="text-align: center;"></div>
<p align="center"><button class="spw_button" onclick=spw_gvk_expl()>Show/Hide explanation</button></p>
<script>
function spw_gvk_expl() {
var x = document.getElementById("gvk_04");
if (x.innerHTML === "") {
x.innerHTML = spw_gvk_expl_brd(4);
} else {
x.innerHTML = "";
}
}
function spw_gvk_expl_brd(brd) {
returnHi, this is the explanation of board ${brd}
}
</script>It is toggling between showing/hiding some explanation.
Is it possible to pass the boardnumber (4 in the code above) as a parameter, so I can use the same code for all boards? Something like
[hfcm id=”123″ brd = “4”]
Kind regards,
Saskia
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.