[Solved] I want to change the css of a page on a the click of a link [closed]


You can do so by using .css() function of jQuery.

$(function() {

  $("#myAnchor").click(function() {
    $("#someDiv").css("color", "yellow");
  });

});
<!DOCTYPE html>
<html>

<head>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>

<body>

  <a href="#" id="myAnchor">Click here </a>

  <div id="someDiv">
    Hello World
  </div>

</body>

</html>

Working DEMO here

solved I want to change the css of a page on a the click of a link [closed]