May 10, 201214 yr If you've got a one instance of a variable (not sure if variable is the correct term) in a script is it possible to wrap it in a div and give each instance a unique class? e.g: revealVoucher_01, revealVoucher_02 this is the code which is retrieved using curl, unfortunately i don't have access to the database. <section> <div id="revealVoucher"> <a href="<?=$affiliate_url?>" target="_blank">Reveal Code</a> </div> <div id="voucherCode"> <a href="<?=$affiliate_url?>"><?=$voucher_code?></a> </div> </section> Edited May 10, 201214 yr by john3y
May 11, 201214 yr Without fully understanding your post, to achieve what you're asking for in the subject, you would use JQuery: $('#revealVoucher').addClass('revealVoucher_01'); You can change the class name to a php variable if that's what you need to do. I have to say though, if they're going to be unique, I wouldn't use classes.
Create an account or sign in to comment