$(function(){ $('#webpage').click(function(){ $('#init').hide(); $('#result').show(); $('#srcurl').html("Source:"); getActionsForThing("http://schema.org/WebPage"); $.get('example/webpage.html', function(data) { var srccode = $("
").text(data); $('#src').html(srccode); }) }); $('#mediaobject').click(function(){ $('#init').hide(); $('#result').show(); $('#srcurl').html("Source:"); getActionsForThing("http://schema.org/ImageObject"); $.get('example/mediaobject.html', function(data) { var srccode = $("").text(data); $('#src').html(srccode); }) }); }); function getActionsForThing(thing){ $.getJSON('intents.js', function(data) { var intents = data; $.getJSON('map.js', function(mdata) { var actions = mdata[thing]; var buf = "