Skip to content

Instantly share code, notes, and snippets.

@hidsh
Created December 14, 2021 16:09
Show Gist options
  • Save hidsh/8dc3fb00d6a92b580d73ec7c28616eca to your computer and use it in GitHub Desktop.
Save hidsh/8dc3fb00d6a92b580d73ec7c28616eca to your computer and use it in GitHub Desktop.
Bulma Example
<!doctype html>
<html lang="ja">
<head>
<title>Bulma Test</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
</head>
<body>
<button class="button is-primary" id="target" onclick="console.log('pressed')">target</button>
<button class="button is-danger" onclick="disableButton()">Diable</button>
<button class="button is-info" onclick="enableButton()">Enable</button>
<script>
function disableButton() {
document.getElementById('target').disabled = true;
console.log('disabled');
}
function enableButton() {
document.getElementById('target').removeAttribute('disabled');
console.log('enabled');
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment