You simply specify the id link tag or class (say id = "deleteMe"), then delete it as shown below:
$('head').find('link#deleteMe').remove();
So, in your case, add id to each file when you link them like this:
<link id="aa" rel="stylesheet" href="First.css" type="text/css" /> <link id="bb" rel="stylesheet" href="Second.css" type="text/css" /> <link id="bb" rel="stylesheet" href="Third.css" type="text/css" />
Now, to remove only Second.css, Third.css, you should write your jQuery as follows:
(function ($) { $('head').find('link#aa').remove(); $('head').find('link#bb').remove(); })(jQuery);
Wahid masud
source share