Manipulate Lightbox Caption with JS
-
Hi Armin,
i was fiddling around with the Lightbox caption and could not manage to manipulate it with JS. The caption itself looks like this:
<p class="custom-lightbox-caption">My Caption Text</p>
the JS:
<script> window.laytheme.on("newpageshown", function(){ jQuery('.sitetitle-txt-inner').parent().addClass('funny-test-class'); //Test if JS Works at all jQuery('.custom-lightbox-caption').addClass('funny-test-class'); //This does not work jQuery('.custom-lightbox-caption').parent().parent().addClass('custom-grid'); //This does not work jQuery('.custom-lightbox-caption').parent().addClass('custom-relative-caption'); //This does not work </script>
Is it not possible to manipulate the Lightbox with js this way?
Best
Felix -
hey sorry for the late reply
sorry dont have time to help you with custom code :/
I don't answer or check forum DMs, please just post on the forum.
Before you post:
Use the Search Feature. Maybe there is already a solution to your issue.
1. Update Lay Theme and all Lay Theme Addons
2. Disable all Plugins
3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
4. Now see if your problem solved itself
5. Go here, see if your problem is listed here:
Troubleshooting
When you post:
1. Post a link to where the problem is
2. If the problem is difficult to explain, post screenshots / link to a video to explain it