I have found here some questions about my problem, but I can't use it. I will change a css property of during click on them via JS, JQuery
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<script src="../scripts/jquery-1.11.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="../css/styles.css">
<script src="../scripts/javascript.js"></script>
</head>
<body>
<div class="osn">
<span>Green</span>
</div>
<div class="osb">
<span>Red</span>
</div>
</body>
</html>
<script>
/*$( document ).ready(function () {
$(".osn").mouseover(function() {
uploadcss()
});
});*/
$( document ).ready(function () {
$(".osn").click(function addcss (csslink){});
});
</script>
and my javascript.js
function uploadcss() {$(".osb").css("border","15px solid blue")};
function downloadcss() {$(".osb").css("border","5px solid red")};
function addcss (csslink) {
var csslink = document.cretaeElement ("link");
csslink.rel = "stylesheet";
csslink.type = "text/css";
csslink.href="../css/test.css";
}
And it's doesn't work :( Why?