API Documentation

Cache
$petrojs('elem').click(function() {
	var firstname = $petrojs('#firstname').getval();
	var lastname = $petrojs('#lastname').getval();
	petrojs.Cache({FirstName:firstname, MiddleName:'YES', LastName:lastname} ,'key',function(obj){
		$petrojs('#cache').html('FirstName:' +obj.FirstName+' MiddleName:'+obj.MiddleName+' LastName:' +obj.LastName);
	});
});
petrojs.onload(function(){
	petrojs.showCachedata(function(obj){
		$petrojs('elem').html('FirstName:' +obj.FirstName+' MiddleName:'+obj.MiddleName+' LastName:' +obj.LastName);
	});
},window.petrojs);
$petrojs('elem').click(function(){
	petrojs.clearCachedata(function(){
		$petrojs('elem').html('Cache Cleared');
	});
});