jquery - Use Ajax or Attributes for Images -
what better dynamically loading images- using ajax function or changing image's src attribute desired link? please supply snippet of code answer. thanks
depends on definition of "better," since javascript doesn't deal binary streams, i'd recommend "changing image's src
attribute" option.
var mysource = '/path/to/image.jpg'; var img = new image(); img.src = mysource; // or $('#someimageid').attr('src', mysource);
Comments
Post a Comment