Remove dynamically added element
<p>I'm trying to remove a stylesheet that is dynamically being added to the end of <code>&lt;head&gt;</code> tag</p>

<p>For some reasons, i'm forced to use javascript to remove that stylesheet tag and add my own</p>

<p>here is the code i tried - </p>

<pre><code>jQuery(document).ready(function(){
jQuery('link[href^="somepath/editor.css"]').remove();
jQuery('head').append("&lt;link href='somepath/custom/editor.css' type='text/css' rel='stylesheet' /&gt;");
});
</code></pre>

<p>the problem is that this function is being executed before the CkEditor functions. So my Stylesheet is being added before the ckeditor stylesheet and the ckeditor stylesheet
I tried using <code>.load</code> instead of <code>.ready</code> but then the code doesn't seem to run at all.</p>

<p>Any help?</p>
