Skip to content

Instantly share code, notes, and snippets.

@lmuntaner
Created July 12, 2015 14:13
Show Gist options
  • Save lmuntaner/283a71f470422a12078e to your computer and use it in GitHub Desktop.
Save lmuntaner/283a71f470422a12078e to your computer and use it in GitHub Desktop.
jQuery Example
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>
<body>
<div class="container" style="margin-top: 50px;">
<button class="btn btn-primary do-something">Do Something</button>
</div>
<script type="text/javascript">
$(".do-something").on("click", function () {
alert("hello worls");
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment