Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

jquery css multiple line

/* To avoid writing the same line several times 
   You can use multiple lines in the css function*/

    $('.selector').css({
     'font-size' : '10px',
     'width' : '30px',
     'height' : '10px'
	});

/* Obviously you can store these value in a variable too */

	var style = {
     'font-size' : '10px',
     'width' : '30px',
     'height' : '10px'
	}

    $('.selector').css(style);

 
PREVIOUS NEXT
Tagged: #jquery #css #multiple #line
ADD COMMENT
Topic
Name
6+8 =