Skip to content

Instantly share code, notes, and snippets.

@nauris-m
Created August 13, 2019 16:00
Show Gist options
  • Save nauris-m/363a1612940c00cb48088ab4a6dde692 to your computer and use it in GitHub Desktop.
Save nauris-m/363a1612940c00cb48088ab4a6dde692 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>title</title>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<h3>variants 1</h3>
<a href="mark.php"><input id="che1" type="checkbox" style="pointer-events: none"><label for="che1"></label></a>
<br>
<h3>variants 2</h3>
<a href="mark.php" id="ppp"><input id="che2" type="checkbox"><label for="che2"></label></a>
<br>
<script>
$("input").click(function (event) {
let message = $(event.target).parent();
$(message).css('border', 'solid 1px red');
$(message)[0].click();
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment