Skip to content

Instantly share code, notes, and snippets.

@joliz
Created October 10, 2016 14:31
Show Gist options
  • Save joliz/a5007fd02662ae0469221ab26bf7eac5 to your computer and use it in GitHub Desktop.
Save joliz/a5007fd02662ae0469221ab26bf7eac5 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=a5007fd02662ae0469221ab26bf7eac5
<!DOCTYPE html>
<html>
<head>
<title>jQuery Practice 1</title>
</head>
<body>
<h1>The jQuery Site</h1>
<div id="info"></div>
<div id="cool"> jQuery is cool I guess</div>
<img id="pic" src="www.fake.com">
</body>
</html>
$("h1").css("color", "green");
$("#info").append("This site was made almost entirely using jQuery!");
$("#cool").html("jQuery is AWESOME!");
$("img").attr("src","https://cdn.meme.am/instances/57092433.jpg");
$("h1").click(function() { alert("Joliz"); });
$("#pic").click(function() { alert("24 karat magic"); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment