Skip to content

Instantly share code, notes, and snippets.

View AlFirous's full-sized avatar
💭
I may be slow to respond.

Al Firous AlFirous

💭
I may be slow to respond.
View GitHub Profile
@AlFirous
AlFirous / Unsplash.html
Last active April 18, 2023 15:49 — forked from 0asa/usage.html
A minimal HTML example to grab a random background from unsplash.com using their API and apply to a div.
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" type="text/javascript"></script>
<script>
function GetRandomBackground()
{
var app_id = 'YOUR_APPLICATION_ID'
var url = 'https://api.unsplash.com/photos/random?client_id=' + app_id;
$.ajax({
url: url,