I want to show these 4 buttons in a row in desktop mode
and show carousel like this only for mobile view
The first pic is for mobile view and the second pic is for pc view
Here is the link to my code https://jsfiddle.net/FODraciel/wehc8ryv/4/
I am trying with javascript and tried some steps which were set width technique but it does not work. Any idea of how to do it?
I have tried some steps like this
window.onload=function(){
w = document.documentElement.clientWidth || document.body.clientWidth || window.innerWidth;
var targetWidth = 768;
if ( w >= targetWidth) {
//Add your javascript for screens wider than or equal to 768 here
}
else {
//Add your javascript for screens smaller than 768 here
}
};
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…