I'm trying to change css stylesheet by clicking on a button.
<head>
<link id='link01' rel="stylesheet" href="blue.css">
</head>
JS
$('.pointcolors').click(function(){
var theme = $(this).attr('data-theme') + '.css';
console.log(theme); // green.css - it's ok
$('#link01').attr('src', theme);
});
But there is no style changes. Nothing happens.
Any help?