LastSongs

Adapt the widget to your liking

Background color:
Header color:
Title color:
Artist color:
Album color:
Song Background color:
Styles:
Width of the widget: px
Require a Last.FM API:

Copy and paste this code following the instructions below, or you can put it togheter. But if you put it all together you have to use jQuery before the first <script>. Remember put a valid Lastfm API key!


                              
Require jQuery: <script src="http://code.jquery.com/jquery-git2.min.js"></script>

LastSongs API

Basic usage

Select a node with jQuery and apply this function: .lastSongs(username, apikey [, timeoutTime, styleSrc]);

An example of this constructor can be: $('.lastfm').lastSongs('melchor629', '1largeapikey...');
This function returns an object. This object is used to manipulate some aspects of the widget, with API functions.

API Functions

Something you should know: All this functions return the same object, allowing chaning functions like this:

$('.lastfm').lastSongs('melchor629', '1largeapikey...').setTimeout(60).setWidth(240).colorDeFondo(100, 234, 100, 0.8).applyStyle();

.setTimeout(time)

Changes the time to update information.

.setTimeoutInMillis(time)

Same as above function, buy in milliseconds

.setWidth(width)

Changes the width of the widget. Useful for change the size smaller for blogs with widget panels smaller than 300px.

.applyStyle()

When some changes are done to the style of the widget, you should call this function to apply the changes. This function doesn’t affect the width.

.colorDeFondo(r, g, b, a)

Changes, internally, the background color of the widget. To apply the changes use .applyStyle()

.colorDeLaCabecera(r, g, b)

Changes, internally, the header color text of the widget. To apply the changes use .applyStyle()

.colorDelTitulo(r, g, b)

Changes, internally, the song title text color of the widget. To apply the changes use .applyStyle()

.colorDelArtista(r, g, b)

Changes, internally, the song artist text color of the widget. To apply the changes use .applyStyle()

.colorDelAlbum(r, g, b)

Changes, internally, the song album text color of the widget. To apply the changes use .applyStyle()

.colorDeCancion(r, g, b)

Changes, internally, the background of one of the song list color of the widget. To apply the changes use .applyStyle()