Skip to content

Instantly share code, notes, and snippets.

@pswaminathan
Created November 9, 2016 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pswaminathan/ac6b14d6b67452a58d1777d4097f57d9 to your computer and use it in GitHub Desktop.
Save pswaminathan/ac6b14d6b67452a58d1777d4097f57d9 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=ac6b14d6b67452a58d1777d4097f57d9
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
<h1>Choose a Service:</h1>
<select id="service-selector">
<option>Choose an option</option>
<option value="Subway">Subway</option>
<option value="Bus">Bus</option>
<option value="BT">BT</option>
<option value="LIRR">LIRR</option>
<option value="MetroNorth">MetroNorth</option>
</select>
<div id="content"></div>
</body>
</html>
{"enabledLibraries":["jquery"]}
$("#service-selector").change(function(){
$("#content").load("https://pswa.me/service/" + $(this).val());
});
body{
margin: 20px;
}
tr:hover{
background-color: yellow;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment