$(element).css(options.css).attr(options.attr).addClass(options.class)
//ensure line-height is correctly assigned
if($(element).is('p') && _.isString(options.css['line-height'])){
console.log('line-height assigned: '+ options.css['line-height'] + ' , and now = ' + $(element).css('line-height'))
}
output:
line-height assigned: 15px, and now = normal
line-height assigned: 15px, and now = normal
line-height assigned: 15px, and now = normal
line-height assigned: 15px, and now = normal
line-height assigned: 15px, and now = normal
line-height assigned: 33px, and now = normal
Why can't I set line-height in pixels....
Check out the jsfiddle (which works fine):
http://jsfiddle.net/wyvernmonarch7/S9Scd/
I'm not sure what's wrong with my code, but something seems off... any ideas?
EDIT: options.css, options.attr, and options.class are all OBJECTS. There are no errors in my code. Removing options.attr and options.class doesn't change anything. Here's the console log from options.css
Object {line-height: "15px", width: 87, height: 15, font: "11px arial", color: "#FFFFFF"…}
color: "#FFFFFF"
display: "none"
font: "11px arial"
font-weight: 400
height: 15
line-height: "15px"
pointer-events: "none"
text-align: "center"
width: 87
__proto__: Object
line-height assigned: 15px, and now = normal
Object {line-height: "15px", width: 87, height: 15, font: "11px arial", color: "#FFFFFF"…}
color: "#FFFFFF"
display: "none"
font: "11px arial"
font-weight: 400
height: 15
line-height: "15px"
pointer-events: "none"
text-align: "center"
width: 87
__proto__: Object
line-height assigned: 15px, and now = normal
Object {line-height: "15px", width: 87, height: 15, font: "11px arial", color: "#FFFFFF"…}
color: "#FFFFFF"
display: "none"
font: "11px arial"
font-weight: 400
height: 15
line-height: "15px"
pointer-events: "none"
text-align: "center"
width: 87
__proto__: Object
line-height assigned: 15px, and now = normal
//////////////
EDIT: running after window.load