Use token in javascript
-
Hello everyone!
To view items in the CataBlog is used jQuery Colorbox (CataBlog lightbox is used to display a different catalog).
The image in the Colorbox is repeated over the entire surface as on the Backhausen website.Here is the used template:
<script type="text/javascript"> function myFunction() { cboxContent.style.background = "url('%IMAGE-ORIGINAL%')"; } </script> <div class="catablog-row catablog-gallery"> <a href="%IMAGE%" title="%DESCRIPTION%" onclick="myFunction()"> <img src="%IMAGE-THUMBNAIL%" title="" alt="%TITLE%" /></a> <div class="catablog-title">%TITLE%</div> </div>
Javascript assigns a background to #cboxContent element in Colorbox, which is repeated over the entire surface.
The problem is that the token %IMAGE-ORIGINAL% always assigns the Colorbox background of the last item in the catalog on the page.
I need to assign the correct background to Colorbox (image of the selected item).
Information images are here: https://rich65.rajce.idnes.cz/CataBlog/
Anyone have any idea?
Thank you for answer.RICH
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Use token in javascript’ is closed to new replies.