Reputation: 490323
I know my jQuery, but sadly don't know much about Prototype.
$(function() {
$('#home-gallery-container').append('<a href="/images/cobra_sale.jpg" alt="" rel="lightbox-home" id="special-home" ><img src="/images/tag.png" alt="Special" /></a>');
});
How would I do this in Prototype, or Magento's library if that adds anything extra.
Note in the sample above, I have taken into account jQuery.noConflict()
etc
Upvotes: 1
Views: 139
Reputation: 11070
This should work:
$('home-gallery-container').insert({
bottom:'<a href="/images/cobra_sale.jpg" alt="" rel="lightbox-home" id="special-home" ><img src="/images/tag.png" alt="Special" /></a>'
});
See Element.Insert in Prototype's Docs.
Upvotes: 3