javascript - How to trigger css :hover event on PageLoad -
i developing application want open cover on pageload . opening on hover. want bring out page inside outside after opening cover.
<div id="onw" class="envelope"> <p>from: <span>lorem</span></p> <p>to: <span>ipsum</span></p> </div> <div class="open"></div> <div id="onee" class="content"> <p>lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> <p>lorem ipsum dolor sit amet</p> </div>
css long copy here have copied code jsfiddle
jsfiddle example :- http://jsfiddle.net/rushijogle/4vs0r6zx/
if dont agree question plz dont mark negative
thanx in advance
you should remove :hover
state , make animation html-class. e.g. .open.animateit
contains animation.
in case can make this:
jquery(document).ready(function($) { jquery('.open').addclass('animateit'); });
further need mouseenter/mouseleave events trigger animation after first pageload.
Comments
Post a Comment