加载时缩放网页上的特定位置

时间:2017-09-07 08:20:00

标签: javascript jquery html css

我正在制作一个移动网页作为该页面上的网页视图我显示多个优惠券图像作为复选框这是我的代码:

<style>
    .bordered{
        border: 5px solid green;
    }
</style>

这是我的HTML

<div class="row ">
    <?php foreach ($results as $result):?>
    <div class="col-md-5 col-md-offset-1 col-centered piege">
        <input type="checkbox" id="piega1" class="piege servizioSection2 " name="imgSection2"value="Piega By Wella Professionals" style="opacity: 0;">
        <label  class="piega labelStylingImg " for="piega1">
            <img height="100" width="100" src="<?php echo $result['coupanImages'];?>" id="<?php echo $result['t_flyercoupan_id'];?>" for="piega1" alt="" class="img-responsive immaginePiega ">
        </label>
    </div>
    <?php endforeach;?>
</div>

这是我的剧本     资产/ JS / jquery.min.js“&GT;

  <script>
        $(document).ready(function() {
            $('.immaginePiega').on('click', function(e){
                e.preventDefault();
                $(this).toggleClass('bordered');
            });
        });
    </script>

当用户看到他在购物车上选择的优惠券并点击它时,用户点击任何图片并将其添加到添加到购物车中,传真页面将打开并放大他在购物车中添加的优惠券。 有任何建议如何完成它或我必须学习的图书馆吗?

0 个答案:

没有答案