DISQUS

NetFactory: Building image tags with jquery

  • Ulrik Hindø · 4 months ago
    Same thing using chaining to make it more readable:
    $('<img>')
    .attr('src', 'image_polar.jpg')
    .attr('alt', 'Polar bear')
    .attr('height', '200')
    .attr('width', '300')
    .click(function () { alert('You clicked the image'); })
    .appendTo('#image');
  • seoworkgroup1 · 4 months ago
    Ya it's good to use a jquery. I like ur stuff and look forward on it.