jQuery Plugin For Displaying Last.fm Information - JamCity

jQuery Plugin For Displaying Last.fm Information - JamCity
File Size: 129KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

JamCity is a jQuery plugin that takes advantage of javascript, CSS3 and last.fm API to display your Last.Fm account info, top albums, loved tracks, top tracks , new releases, or recent tracks on your web page.

How to use it:

1. Get the last.fm API key from http://www.last.fm/api/account

2. Include jQuery library and jQuery Jamcity Plugin at the bottom of your web page

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

3. Include jmc_styles.min.css to style the plugin

<link rel="stylesheet" href="css/jmc_styles.min.css" type="text/css">

4. Create a container for jQuery JamCity

‹div id="JMC_Container"›‹/div›

5. Call the plugin with settings

$("#demo1").JamCity({
apiKey: '', // Your Last.fm API key.
username: '', // Your Last.fm username.
contentType: '', // Content to display. 
artSize: '', // Album art size
artQuality: 'normal' // Album art quality.
number: 5, // Number of tracks to display. 
refreshResults: true, // Auto refresh for new results without reloading the page
refreshResultsInt: 45000, // How often do you want to pull new results?
tooltips: true, // Use tooltips
nowPlayingIcon: true, // See the "Now Playing" equalizer icon if that value exists
_blankLinks: true, // Links to open in a new window
noAlbumArtImg:'http://placehold.it/126x126&text=No Art', // Default image to use if there is no album art for the track.
cssWrapperID: 'jmc_wrap', // CSS ID for `UL` wrapper. 
cssThemeClass: 'jmc_dark_theme', // CSS theme to use. 
noLovedTracks: 'Sorry, No loved tracks...', // Text to display when there is no loved tracks.
noTopAlbums: 'Sorry, No top albums...', // Text to display when there is no top albums.
noTopTracks: 'Sorry, No top tracks...', // Text to display when there is no top tracks.
noNewReleases: 'Sorry, No new releases...', // Text to display when there is no new releases.
noRecentTracks: 'Sorry, No recent tracks...', // Text to display when there is no recent tracks.
onComplete: function () { // On complete, fun a function or do something else.
}
});

This awesome jQuery plugin is developed by bluetidepro. For more Advanced Usages, please check the demo page or visit the official website.