jquery - I am trying to give zooming effect for four div's on mouse hover. But the flickering effect is being seen. How to overcome this? -


i have 4 rectangular boxes (myimage, myimage1, myimage2, myimage3). on top of have content write upon. have taken divs, if hover on showing flicker effect.

<div class="row fourbox">     <div id="myimage">         <div class="one">             <div class="col-sm-4 onefourth"><i class="fa fa-plug" aria-hidden="true"></i></div>             <div class="col-sm-8 twofourth"> motes <span id="spannum1">32</span></div>         </div>         <div class="two">             <div class="col-sm-6 threefourth">active motes <span id="spannum2">15</span></div>             <div class="col-sm-6 fourth"> standby motes <span id="spannum3">17</span></div>         </div>     </div>     <div id="myimage1">         <div class="one">             <div class="col-sm-4 onefourth"><i class="fa fa-plug" aria-hidden="true"></i></div>             <div class="col-sm-8 twofourth"> sensors <span id="sensornum1">37</span></div>         </div>         <div class="two">             <div class="col-sm-6 threefourth">active sensors <span id="sensornum2">20</span></div>             <div class="col-sm-6 fourth"> standby sensors <span id="sensornum3">17</span></div>         </div>     </div>     <div id="myimage2">         <div class="one">             <div class="col-sm-4 onefourth"><i class="fa fa-plug" aria-hidden="true"></i></div>             <div class="col-sm-8 twofourth"> network <span id="networknum1">98%</span></div>         </div>         <div class="two">             <div class="col-sm-6 threefourth">active motes <span id="networknum2">30</span></div>             <div class="col-sm-6 fourth"> standby motes <span id="networknum3">2</span></div>         </div>     </div>     <div id="myimage3">         <div class="one">             <div class="col-sm-4 onefourth"><i class="fa fa-plug" aria-hidden="true"></i></div>             <div class="col-sm-8 twofourth"> coordinator <span id="coordnum1">5 tx</span></div>         </div>         <div class="two">             <div class="col-sm-12 threefourth">coord mac<span id="coordnum2">0x002334457742</span></div>         </div>     </div> </div> 

here css:

#myimage, #myimage1, #myimage2, #myimage3 {     border-radius: 5px;     width: 200px;     height: 150px;     display: inline-block;     margin-right: 56px; } #myimage {     background-color: #da9e37; } #myimage1 {     background-color: #be4932; } #myimage2 {     background-color: #0f5b63; } #myimage3 {     background-color: #af7973; } 

here javascript code:

function zoomonhover(element, zoom, seconds) {     var timeline = new timelinelite({         paused: true     });     timeline.to(element, seconds, {         scale: zoom,         ease: elastic.easeout     });     timeline.to(element, seconds, {         scale: 1     });     element.onmouseover = function() {         console.log("hover detected on " + element.id);         timeline.restart();     }; } zoomonhover(document.getelementbyid('myimage'), 1.15, 1); zoomonhover(document.getelementbyid('myimage1'), 1.15, 1); zoomonhover(document.getelementbyid('myimage2'), 1.15, 1); zoomonhover(document.getelementbyid('myimage3'), 1.15, 1); 

i not getting problem is. have used greensock framework hover effect. please me solve this?


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -