Before you disconnect a style from the original using jQuery, why don't you assign the original style value to the data for this element and then restore it using this value.
So, let's say you change the font family of the css element with the class "foo":
To apply the new css:
var orig = $(".foo").css('font-family');
$(".foo").data('origFont', orig);
$(".foo").css('font-family', 'Arial');
To return css:
var orig = $(".foo").data('origFont');
$(".foo").css('font-family', orig);
source
share