title: How to change image size and change next/prev image using Jquery?
body: <p>I want to develop a light box plugin so i created some css and made this script below</p>
  
  <pre><code>$(function (){
     $("img").click(function() {
     var imp = $(this).attr('src');
     var i=700;
     var j=700;
     $(".box").html($("&lt;img&gt;").attr("width", i));
     $(".box").html($("&lt;img&gt;").attr("width", j));
     $(".box").html($("&lt;img&gt;").attr("src", imp));
  
  
    });
  });
  
  
  css
  
  .box
          {
              position:absolute;
              top:20%;
              left:20%;
              width:auto;
              height:auto;
              background:#ffffff;
              z-index:999999;
              padding:10px;
              box-shadow:0px 0px 5px #444444;
              display:none;
          }
  </code></pre>
  
  <p>Here <strong>.box</strong> is the class div in which i'm showing the image when a user clicks it.but i want to show it in big, so i used <strong>width</strong> attr but its not changing for me. also  i want to add next previous functionality to change the images to next image when the user clicks next and prev. Can anyone help?</p>