Make Everything Mobile Friendly


/ Published in: JavaScript
Save to your folder(s)

Load jQuery and tell every div to be 100% width


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.