$(document).ready(function() { var success = function(x) { $("#ipfs > em").html(x); }; var error = function(x) { $("#ipfs").hide(); console.log("ipfs hash not found: " + x); }; getApiIpfsCurrent(success, error); });