Posted By

cmndo on 08/21/12


Tagged

jquery mobilefriendly


Versions (?)

Make Everything Mobile Friendly


 / Published in: JavaScript
 

Load jQuery and tell every div to be 100% width

  1. var scr = document.createElement('script');
  2. scr.setAttribute('src', 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js');
  3. document.body.appendChild(scr);
  4.  
  5. scr.onload = function(){
  6.  
  7. $('div').attr('class', '').attr('id', '').css({
  8. 'margin' : 0,
  9. 'padding' : 0,
  10. 'width': '100%',
  11. 'clear':'both'
  12. });
  13. };

Report this snippet  

You need to login to post a comment.