I have this website: http://urbanphenomena.net/
For the highslide, I have created a caption which looks nice on desktop on the left side of the images, it displays the same in mobile which is not good looking so I decided to code this:
<script type="text/javascript">
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-black';
hs.wrapperClassName = 'dark';
hs.fadeInOut = true;
hs.dimmingOpacity = 0.75;
// Add the controlbar
if (hs.addSlideshow) hs.addSlideshow({
//slideshowGroup: 'group1',
interval: 5000,
repeat: false,
useControls: true,
fixedControls: 'fit',
overlayOptions: {
opacity: .75,
position: 'bottom center',
hideOnMouseOut: true
}
});
</script>
<script type="text/javascript">
hs.graphicsDir = 'js/highslide/graphics/';
hs.captionOverlay.position = "leftpanel";
hs.captionOverlay.width = "350px";
if ($(window).width() <= 1000) {
hs.captionOverlay.width = "150px";
hs.align = 'left';
}
</script>
hs.captionOverlay.position = 'leftpanel' is the code responsible for the caption positioning, but if i put that on the if statement, it will look like this in the mobile: https://i.stack.imgur.com/leRmo.jpg
What do you think the issue is?
I think you'll find it easier to come at this from the other direction. Let the caption show below the image (the default), but if the window is wider than 1000px, move it to the leftpanel: