Posted By

envane21 on 09/07/15


Tagged

page responsive


Versions (?)

Responsive jQuery


 / Published in: jQuery
 

The basic structure of making a page responsive

  1. $(window).resize(function(){
  2. if($(window).width() <= 641){
  3. $("div").css({'display': 'block'});
  4. $(".mainTitle").css({'display':'none'});
  5. $("#mainImg img").attr('src', "<?=$this->staticPath?>/img/mainTitleMob1.png");
  6. }else{
  7. $("#mainImg img").attr('src', "<?=$this->staticPath?>/img/phoneL.png");
  8. $(".mainTitle").css({'display':'block'});
  9. }
  10. });

Report this snippet  

You need to login to post a comment.