I AM USING TWO STYLESHEET HERE FIRST IS yellow.css AND SECOND IS blue.css.
I AM SIMPLY CHANGING ATTRIBUTE OF LINK TAG
HERE IS CODE
<html>
<head>
<title></title>
<link id="original" rel="stylesheet" type="text/css" href="yellow.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#grey").click(function(){
$("#original").attr("href", "blue.css");
});
});
</script>
</head>
<body>
<button id="grey" onclick="turnGrey">Turn Grey</button><br />
<div id="puspa"></div>
</body>
</html>
I AM SIMPLY CHANGING ATTRIBUTE OF LINK TAG
HERE IS CODE
<html>
<head>
<title></title>
<link id="original" rel="stylesheet" type="text/css" href="yellow.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#grey").click(function(){
$("#original").attr("href", "blue.css");
});
});
</script>
</head>
<body>
<button id="grey" onclick="turnGrey">Turn Grey</button><br />
<div id="puspa"></div>
</body>
</html>
Comments
Post a Comment