Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

lorem ipsum json api

// Requires: JQuery
// Source: https://baconipsum.com/json-api/
$(document).ready(function() 
{
	$.getJSON('https://baconipsum.com/api/?callback=?', 
		{ 'type':'meat-and-filler', 'start-with-lorem':'1', 'paras':'3' }, // get the json api response
        function(baconGoodness) // bacon goodness contains our bacon ipsum
        {
            if (baconGoodness && baconGoodness.length > 0)
            {
                console.log(baconGoodness); // show it to the console
            }
    	}
   });
});
 
PREVIOUS NEXT
Tagged: #lorem #ipsum #json #api
ADD COMMENT
Topic
Name
2+8 =