Hi! How to disable the slider on the mobile version?
Thanks
|
|
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
|
|
I added the code, but the slider still there.
Any idea why?
Thanks
|
|
Hi,
This code removes the IMAGES slideshow for all devices with a screen smaller than 768 pixes horizontally or vertically.
The code is tested on all major browsers and it works. If it doesn’t work on your computer, we will need the website url and admin access, if possible.
You can use hidepost to share private information with the support staff.
Best,
ThemeBurn team
|
|
This is the code of the images.tpl file
<script type="text/javascript">
if (document.documentElement.clientWidth < 768 || document.documentElement.clientHeight < 768) {
$('#intro').remove();
}
</script>
<?php $hasSlider = count($intro_images['files']) > 1; ?>
<div id="intro_wrap">
<div id="image_intro" class="s_wrap">
<div id="image_intro_preview"<?php if ($intro_images['with_border']) { ?> class="s_boxed"<?php } ?>>
<div class="slides_container">
<?php $i = 0; foreach($intro_images['files'] as $image): ?>
<div class="slideItem"<?php if($hasSlider): ?> style="display: none"<?php endif; ?>>
<?php if($image['url']): ?>
<a href="<?php echo $image['url']?>">
<?php endif; ?>
<img src="<?php echo $image['http_file']; ?>" width="<?php echo $image['width'] ?>" height="<?php echo $image['height'] ?>" />
<?php if($image['url']): ?>
</a>
<?php endif; ?>
</div>
<?php $i++; endforeach; ?>
</div>
<?php if($hasSlider): ?>
<span class="s_button_prev_holder">
<a class="s_button_prev" href="javascript:;"></a>
</span>
<span class="s_button_next_holder">
<a class="s_button_next" href="javascript:;"></a>
</span>
<?php endif; ?>
</div>
</div>
</div>
<?php if($hasSlider): ?>
<script type="text/javascript" src="<?php echo $tbData->theme_javascript_url; ?>jquery/jquery.slides.min.js"></script>
<script type="text/javascript">
var slideEffect = '<?php echo $intro_images['rotation_type'] ?>';
</script>
<script type="text/javascript" src="<?php echo $tbData->theme_javascript_url; ?>images_slide.js"></script>
<?php endif; ?>
Im using the code right above 1; ?>. Im refreshing the page, clearing the cache, and nothing. I have also put it in the bottom or with the other javascripts, but nothing.
Any idea?
-
This reply was modified 3458 days ago by kaliyas.
|
|
I solved the issue
Thanks
|
|
You can use this solution for any website element
BR,
ThemeBurn team
|
|