====== Styles ====== For performance reasons, Karmagination will not be camel-casing the CSS properties. If you with to use these methods make sure to do them yourself, ie. zIndex (not z-index), backgroundColor (not background-color). ===== css( name ) ===== Get the current value of the style for the first element.
a
Karma('div').css('color'); // returns red ===== css( name, value ) ===== Sets the current value of the style. Karma('div').css('color', 'blue'); // makes div color blue ===== css( properties ) ===== Sets a bunch of styles to the elements.
Hello
Karma('div').css({ color: 'red', backgroundColor: 'blue' }); ===== height( ) ===== Get the calculated height of the first element.
abc
Karma('div').height(); // returns 10 ===== height( val ) ===== Set the inline CSS height to val on the selected elements.
abc
Karma('div').height('10px'); Karma('div').height(); // returns 10 ===== width( ) ===== Get the calculated width of the first element.
abc
Karma('div').width(); // returns 10 ===== width( val ) ===== Set the inline CSS width to val on the selected elements.
abc
Karma('div').width('10px'); Karma('div').width(); // returns 10