/ Published in: jQuery

The basic structure of making a page responsive
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(window).resize(function(){ if($(window).width() <= 641){ $("div").css({'display': 'block'}); $(".mainTitle").css({'display':'none'}); $("#mainImg img").attr('src', "<?=$this->staticPath?>/img/mainTitleMob1.png"); }else{ $("#mainImg img").attr('src', "<?=$this->staticPath?>/img/phoneL.png"); $(".mainTitle").css({'display':'block'}); } });
Comments
