I'm trying to make a news site (updating an existing one, really based on CMSMS, which has lots of autogenerated code that seems to cause all sorts of problems.) anyhow, I'm updating a template, where, instead of going to a new site where the article belonging to the resume is posted, I would like the resume to hide the div with the resume text in it at the click of a "read more" button. I know how to make the toggle button and all that, the issue is several resumes at the same page needing unique ID's that are set in the template automatically. The idea i had was to generate them with:
<?php $firstId = uniqid(); $secondId = uniqId(); ?>
Then I'd call them like so:
<div id="<?php echo $firstId; ?>" class=""> perhaps <span>here </span> or whatevs.</div>
And then something Similar for the second Id. The idea of doing it this way is that i'll be able to target these Divs from JS by simply aiming is at the $firstId fx.
however, if i rightclick and inspect the element with firebug i just get
id="<?php echo $firstId; ?>"
instead of:
id="someUniqueId"
So the question is how do i get it to actually parse the code so i can call the element by the ID? e.g. set its visibility to hidden.