Read/Write/Remove ONLY THE INLINE STYLES of a jQuery Element
You can write values with !important now, which jquery does not support natively.
demo: http://jsbin.com/veyagikazavi/8/edit
Just like the usual $el.css() but only applies on inline styles.
This will return the exact value though, so for example if it has !important in it, that would be included,
$el.inlineCss('z-index'); // single property
$el.inlineCss('z-index', '20 !important');
// or using a hash
$el.inlineCss({
'z-index': '20 !important',
'background-color': 'red !important'
});Notice the empty string
// single property
$el.inlineCss('z-index', '');
// or using a hash
$el.inlineCss({
'z-index': '',
'background-color': ''
});Just like the usual css(), when writing or removing, you can chain other jQuery functions.
$el.inlineCss('display', 'none !important').parent().width();Down to IE8, as long as you're using jquery 1.x