jQuery(document).ready(function($) { $("#a2widget").html('
Loading AlternativeTo Widget
'); var a2options = $("#a2options").val().split(","); $.ajax({ type: "GET", dataType: "json", url: "http://api.alternativeto.net/api/apps/alternatives/?app=" + a2options[1] + "&count=" + a2options[0] + "&category=" + a2options[2] + "&jsoncallback=?", success: function(data) { var sHtml = "
"; sHtml += "
" + data.Votes + "likes

"; sHtml += "" + data.Name + "

"; sHtml += "

" + data.ShortDescription + "

"; sHtml += "

Platforms

" + data.Platforms.join(", ").replace("Windows", "Win") + "
"; sHtml += "

License

" + data.License.replace('Free with limited functionality', 'Free (Limited)') + "
"; sHtml += "
"; sHtml += "
"; sHtml += "

The best alternatives to " + data.Name + " from AlternativeTo

"; sHtml += "
"; $("#a2widget").html(sHtml); } }); });