Disable slider on mobile version

ThemeBurn SupportForumsOpenCart ThemesShoppica 2 OpenCart ThemeDisable slider on mobile version

This topic has been marked as resolved.

Hi! How to disable the slider on the mobile version?
Thanks

October 19, 2014 at 7:55 am #33484
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
October 28, 2014 at 10:35 am #33746

I added the code, but the slider still there.

Any idea why?

Thanks

October 30, 2014 at 9:49 am #33859

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

November 5, 2014 at 12:23 pm #34025

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.
November 6, 2014 at 9:41 am #34065

I solved the issue :)
Thanks

November 6, 2014 at 10:14 am #34067

You can use this solution for any website element :)

BR,
ThemeBurn team

November 6, 2014 at 11:54 am #34068
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.