<acidjs-xcdinfo artist="Joe Satriani" album="Unstoppable Momentum"> </acidjs-xcdinfo>
… And you will get this:
Or if you prefer a more compact rending, like:
<acidjs-xcdinfo mode="compact" artist="Sepultura" album="Arise"> </acidjs-xcdinfo>
Or… why not go really minimalist, and show the cover art only (of course, everyone knows that album):
<acidjs-xcdinfo mode="minimal" artist="Sodom" album="Tapping the Vein"> </acidjs-xcdinfo>
HTML Attributes of the Tag
Any native HTML attribute (
style, etc.) is supported, plus the component-specific:
artist– Required artist name to search on Last.Fm.
album– Required album name to search on Last.Fm.
mode– Optional display mode of the component. The default mode is
"minimal"are the other two options.
as well as their jQuery or other libraries aliases), plus the component-specific:
render(artist, album, mode)– Render album info in the queried acidjs-xcdinfo
modeparameter is optional and if not set to
any of the
"full"mode will be used. Example:
document.querySelector("#album-02").render("Steve Vai", "Passion and Warfare", "full");
document.getElementById("#album-02").render("Steve Vai", "Passion and Warfare", "full");
$("#album-02").get(0).render("Steve Vai", "Passion and Warfare", "full");
getData()– Get the stored current DTO, received from Last.Fm. Example:
Sharing the same interest towards HTML5 Web Components? Check my other experiments, related to that exciting technology. If you are interested in similar 3rd-party widgets or APIs make sure you check my IMDB Fetcher project.
Rock and Roll!