NOTE:- There's no need to use
addClass('') or removeClass('').
<div class="pane active">
Content Here..
</div>
<style>
.active {
color: red;
}
</style>
<script>
$(window).on('load resize', function() {
$(".pane").toggleClass("active", $(window).width() >= 600);
});
</script>
No comments:
Post a Comment