title: Add alt atttibute to an image in javascript
body: <p>I need some help and guidence.
  Can someone help me add the alt attribute of an image in this code?
  I've tried this :
  slide.prepend($(imgLoaded).attr('class','imgLoaded','alt','Image').css('visibility','hidden'));
  but didn't work. Any ideas?
  Thank you</p>
  <pre><code>var slide = $('.cameraSlide:eq('+slideI+')',target);
      var slideNext = $('.cameraSlide:eq('+(slideI+1)+')',target).addClass('cameranext');
      if( vis != slideI+1 ) {
          slideNext.hide();
      }
      $('.cameraContent',fakeHover).fadeOut(600);
      $('.camera_caption',fakeHover).show();
      
      $('.camerarelative',slide).append($('&gt; div ',elem).eq(slideI).find('&gt; div.camera_effected'));
  
      $('.camera_target_content .cameraContent:eq('+slideI+')',wrap).append($('&gt; div ',elem).eq(slideI).find('&gt; div'));
      
      if(!$('.imgLoaded',slide).length){
          var imgUrl = allImg[slideI];
          var imgLoaded = new Image();
          imgLoaded.src = imgUrl +&quot;?&quot;+ new Date().getTime();
          slide.css('visibility','hidden');
          slide.prepend($(imgLoaded).attr('class','imgLoaded').css('visibility','hidden'));
          var wT, hT;
          if (!$(imgLoaded).get(0).complete || wT == '0' || hT == '0' || typeof wT === 'undefined' || wT === false || typeof hT === 'undefined' || hT === false) {
              $('.camera_loader',wrap).delay(500).fadeIn(400);
              imgLoaded.onload = function() {
                  wT = imgLoaded.naturalWidth;
                  hT = imgLoaded.naturalHeight;
                  $(imgLoaded).attr('data-alignment',allAlign[slideI]).attr('data-portrait',allPor[slideI]);
                  $(imgLoaded).attr('width',wT);
                  $(imgLoaded).attr('height',hT);
                  target.find('.cameraSlide_'+slideI).hide().css('visibility','visible');
                  resizeImage();
                  nextSlide(slideI+1);
              };
          }
      }
  </code></pre>