β β The Better HTML β β
Neo HTMl, or nHTML for short, is the better HTML, adding alot more fun, useful tags.
Table of Contents
Add the JS link in your project files
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>My Totally Awesome Project</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="the-link-to-the-js"></script> <!-- Add this to your HTML -->
</head>
<body>
Hello world
</body>
<script src="script.js"></script>
</html>
Neo toggle is an element which has a special property; everytime it is clicked, it will toggle its on property.
<neo-toggle> Type Something here </neo-toggle>
You can use the hasAttrbute() function of javascript to check if it is on or off
if (document.getElementById('my-toggle').hasAttribute('on')) {
// On
}
else {
// Off
}
The Element also has a disabled property, making it grey out & uninteractable
<neo-toggle disabled> Type Something here </neo-toggle> <!-- Disabled Toggle -->
Here is a list of error codes and what they mean
Error Name | Explanation | Code |
---|---|---|
Invalid_Data_Type | You have used the wrong type of data For ex. String instead of Integer |
1 |
Data_Out_Of_Bounds | Your data is not within the limits For ex. max = 20, but value = 21 |
2 |