title: How to change content in div on click?
body: <p>Trying to change some content in divs on click. Found one solution, but it works only with ID. Change content of only one div. How to fix it? </p>
  
  <pre><code>$(document).ready(function () {    
  $("#buttons a").click(function() {
      var id = $(this).attr("id");
      $("#pages div").css("display", "none");
      $("#pages div#" + id + "").css("display", "block");
      });});
  </code></pre>
  
  <p>Here is <a href="https://jsfiddle.net/mA8hj/140/" rel="nofollow noreferrer">Jsfiddle</a></p>
  
  <p>UPDATE.
  Edited Jsfiddle a little bit. Here is picture:</p>
  
  <p><a href="https://i.stack.imgur.com/wxOtx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wxOtx.png" alt="enter image description here"></a></p>