I am currently creating a responsive web design using media queries. For mobile devices I want to remove my JS slider and replace it with something else. I have looked at
You can also use jquery function addClass() and removeClass() or removeAttr()
to fulfill your purpose.
Example:
$(window).resize(function(){
if(window.innerWidth < 500) {
$("#slider").removeAttr("style");
}
});
Or you can also use media query as follow :
#mySlider{
display: block;
}
@media (max-width: 500px)
{
#mySlider
{
display: none;
}
}