Skip to content

Instantly share code, notes, and snippets.

@starikovs
Last active December 14, 2015 18:09
Show Gist options
  • Save starikovs/5127659 to your computer and use it in GitHub Desktop.
Save starikovs/5127659 to your computer and use it in GitHub Desktop.
Php alt-checkbox demo snippet
<?php if (isset($_POST['checkbox1'])) : ?>
<p style="color: #ffa500">Checked!</p>
<?php endif; ?>
<form action="demo.php" method="post">
<input type="checkbox" id="checkbox1" name="checkbox1" <?php if (isset($_POST['checkbox1'])) : ?> checked<?php endif; ?>>
<label for="checkbox1" >Check Me! I'm medium.</label>
<br><br>
<input type="submit">
</form>
<script>
jQuery("#checkbox1").altCheckbox();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment