I have a div (#bob_show) that shows and another (#slider_mobile) that's hidden when open on a pc browser. I need there statement to be reversed when open on a mobile device...
Thanks a lot for your help!
Hugo
I have a div (#bob_show) that shows and another (#slider_mobile) that's hidden when open on a pc browser. I need there statement to be reversed when open on a mobile device...
Thanks a lot for your help!
Hugo
You can detect the navigator type and based upon that you can do the this as desired.
for more refference visit a link this question.
how ever if your concern is browser width then you can go with the below technique
// you can change the width condition as per your need
if(window.matchMedia('max-width:420px').matches || $(window).width() < 768){
// small devide
$('#slider_mobile').show();
$('#bob_show').hide();
}else{
$('#slider_mobile').hide();
$('#bob_show').show();
}