jquery - Using zoom on a specific div only -


we have seatplan when on mobiles handy have zoom function on setaplan only. @ moment when zoom in using pinch on andoid mobile zoom in, have pinch out maintain responsive of page.

here example of #seats div wish zoom in on https://jsfiddle.net/ohaumyxj/

is can achieved plain css or jquery come mix here? looking type of thing google maps on contact page of site or perhaps bit better tap zoom function.

.container {    margin: 0 auto;  }  #bmessage {    padding: 1px 3px;    height: 20px;    font-size: 14px;    background: #ddf;    color: #080;    font-weight: bold;  }  #seats:before {    content: '';    display: block;    padding: 50%;  }  #seats {    margin: 10px 0;    padding: 10px 0;    position: relative;    background-image: url(https://s21.postimg.org/qd8mqgh07/seatplan11.gif);    background-repeat: no-repeat;    background-size: contain;  }  #seats div {    position: absolute;    width: 1.5%;    height: 1.5%;  }  #seats .green {    background: url('https://s12.postimg.org/93ugmrvb1/seatg.gif') no-repeat center;    background-size: cover;    margin:0 !important;  }
<div id="theatre">    <div class="container">      <div id="bmessage">select seats need.</div>      <div id="seats">        <div class="avail std green" si="332" title="y1" style="top: 8.7%; left: 10.2%; border: none; margin: 3px 1px;"></div>        <div class="avail std green" si="333" title="y2" style="top:8.7%; left:13%;"></div>        <div class="avail std green" si="334" title="y3" style="top:8.7%; left:16.2%;"></div>        <div class="avail std green" si="335" title="y4" style="top: 8.7%; left: 18.8%; border: none; margin: 3px 1px;"></div>        <div class="avail std green" si="336" title="y5" style="top: 8.7%; left: 21.5%; border: none; margin: 3px 1px;"></div>        <div class="avail std green" si="337" title="y6" style="top:8.7%; left:24.2%;"></div>      </div>    </div>  </div>

please refer fiddle

html

<div id="theatre" class="zoomviewport">         <div class="container zoomcontainer">             <div id="bmessage">select seats need.</div>             <div id="seats" class="zoomtarget">                 <div class="avail std green" si="332" title="y1" style="top: 8.7%; left: 10.2%; border: none; margin: 3px 1px;"></div>                 <div class="avail std green" si="333" title="y2" style="top:8.7%; left:13%;"></div>                 <div class="avail std green" si="334" title="y3" style="top:8.7%; left:16.2%;"></div>                 <div class="avail std green" si="335" title="y4" style="top: 8.7%; left: 18.8%; border: none; margin: 3px 1px;"></div>                 <div class="avail std green" si="336" title="y5" style="top: 8.7%; left: 21.5%; border: none; margin: 3px 1px;"></div>                 <div class="avail std green" si="337" title="y6" style="top:8.7%; left:24.2%;"></div>             </div>         </div>     </div> 

jquery:

 $(document).ready(function () {             $("#seats").click(function (evt) {                 $(this).zoomto({ targetsize: 0.75, duration: 600 });                 evt.stoppropagation();             });         }); 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -