Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. When adding one css property to something, use ( to open it, and ) to close it.  Put your property inside, starting with the name of it (e.g. height) surrounded by single quotes, followed by a comma, and then what you'd like to add (e.g. 200px) also surrounded by single quotes.
  2.  
  3. $('div').css('height', '200px');
  4.  
  5. When adding multiple css changes to something, use ({ to open it, and }) to close it.  Put your properties inside one after another followed by a comma.
  6.  
  7. $('div').css({
  8.  'width: '200px',
  9.   'height': '200px',
  10.   'border-radius': '10px'
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement