I'm not entirely sure what you are after, but I'm making an assumption that you have the inline style on the div tag, and via CSS, you're trying to over-ride that.
The only option here is the !important
flag in your css file. So in your css file you'd have this:
.mozgradient {background-image(whatever) !important}
UPDATE:
I see now that you are trying to do it via jQuery. Try this:
var divWidth = $yourDiv.css('width');
$yourDiv.removeAttr('style').css('width', divWidth);
Though note that that would only work provided 'width' is the only css inline style you want to preserve. If there could be any inline style in there, you'd have to resort to either the CSS option above of using !important or using jQuery, grab the entire style attribute and get dirty with REGEX to parse out any background-image styles specifically.
UPDATE II:
OK, based on the comments, this is getting tricky. The challenge is that there may be any number of inline styles being applied via the style
attribute (ugh! I feel your pain!) and we only want to clear out the background-image
so that we can let the external CSS handle it.
Here's another option:
// create a div and attach the class to it
$testDiv = $('<div>').class('mozgradient').css('display','none');
// stick it in the DOM
$('body').append($testDiv);
// now cache any background image information
var bgndImg = $testDiv.css('background-image');
// get rid of the test div you want now that we have the info we need
$testDiv.destroy();
// now that we have the background-image information
// from the external CSS file, we can re-apply it
// to any other element on the page with that class
// name to over-ride the inline style
$('.mozgradient').css('background-image',bgndImg);
Clunky, but I think it'd work.