You need to disable it, removing the element does nothing. To select the element by the href value, you need to use a attribute selector.
$('link[href="css/customCss.css"]')[0].disabled=true;
and if you are going to be adding and "removing" it, you might want to check for it first and reenable it.
function loadCss(href) {
var sSheet = $('link[href="' + href + '"]');
if (sSheet .length) {
sSheet[0].disabled = false;
} else {
var cssLink = $("<link rel='stylesheet' type='text/css' href='" + href + "'>");
$("head").append(cssLink);
}
}
Running Example:
function loadCSS(href) {
var sSheet = $('link[href="' + href + '"]');
if (sSheet.length) {
sSheet[0].disabled = false;
} else {
var cssLink = $("<link rel='stylesheet' type='text/css' href='" + href + "'>");
$("head").append(cssLink);
}
}
function removeCSS(href) {
$('link[href="' + href + '"]')[0].disabled = true;
}
$("button.add").on("click", function() {
loadCSS("http://cdn.sstatic.net/stackoverflow/all.css");
});
$("button.remove").on("click", function() {
removeCSS("http://cdn.sstatic.net/stackoverflow/all.css");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<h1>Hello</h1>
<div class="topbar">
<div class="icon-achievements">
<button class="add unread-count">Add</button>
<button class="remove unread-count">Remove</button>
</div>
</div>