jquery - Flipcard hover into onclick action -
i've created flip-cards activate when hovered over. css.
i'm trying port similar on mobile version , pretty stuck on how approach this.
what i'm looking way transfer hover onclick style event.
i've uploaded card here.
www.anorris.co.uk/flip
i hoping point me in right direction?
if it's improve me set code out in here allow me know , i'll instead.
thanks,
alistair.
you accomplish using :active
selector in combination :hover
(as long :active
selector called after :hover
selector)
so try:
.stuff1:hover, .stuff1:active { -webkit-transition-delay: 0.25s; transform: rotatey(180deg); }
but if want utilize jquery, you'd want alter css of :hover
class say: .active
add together jquery toggle class on click like:
$('.x').on('click', function(){ $(this).toggleclass('active'); });
if set code jsfiddle i'd happily help further, should started in right direction.
fiddle demo
jquery html css
No comments:
Post a Comment