Pietro Setti
asked 10 years ago

Hi there,
First of all Fixel theme is Great!
I have request by client to enable hover/double click for tablets to reveal mask instead going directly to blog post for social wall contents at home page.
Phones are working OK with it.
Can you please advice on this?
Thanks in advance
OT

1 Answers
Kido D
answered 10 years ago

Hi OT,
To resolve this issue, you can go to Dashboad > Appearances > Customize > Custom Code, and add the code below to Header Code section:

<style>
.touch .block .view-pic .mask,.touch .block .view-video .mask {
display:none;
}
.touch .block.active .view-pic .mask,.touch .block.active .view-video .mask {
display:block;
}
</style>

… and the following code to Footer Code section:

<script>
jQuery(function($){
var firsttouch = true;
$('.touch .block').on({ 'touchstart' : function(e){
if(firsttouch ) e.preventDefault();
firsttouch = false;
$(this).addClass('active');
} });
});
</script>

Hope this helps!

Pietro Setti
replied 10 years ago

Hi Kido D,

thanks for code. Have to say it isn’t work on my site. Any alternatives?

OT

Pietro Setti
replied 10 years ago

Hi Kido D,

I have done crossbrowser testing and have found this problem on android tablets (chrome and FF) can you advice how to improve your code and make it work in those browsers as well?

Thanks in advance
OT

Powered by DW Question & Answer Pro