brandonaaron/jquery-cssHooks — pull request #40 by atotic (2013-03-07 19:41:41+00:00)
Title: Update gradients.js

Bug: hook did not work on multiple gradients.
Why: "".replace(str, ) only replaces first occurence
Fix: Use regex as an argument to "".replace

This fixed multiple gradients for me.

Example bad css:
$(document.body).css({
background: 'linear-gradient(135deg, #708090 22px, #d9ecff 22px, #d9ecff 24px, transparent 24px, transparent 67px, #d9ecff 67px, #d9ecff 69px, transparent 69px), linear-gradient(225deg, #708090 22px, #d9ecff 22px, #d9ecff 24px, transparent 24px, transparent 67px, #d9ecff 67px, #d9ecff 69px, transparent 69px) 0 64px'});