FFNM/test/validate.html
2020-07-22 19:31:19 +02:00

117 lines
4.7 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Test syntax</title>
<script src="../dist/ffnm.min.js"></script>
</head>
<body>
<!-- Class with ID -->
<div is-click="class:add('show1', '#menu1')">add</div>
<div is-click="class:remove('show2', '#menu2')">remove</div>
<div is-click="class:toggle('show3', '#menu3')">toggle</div>
<!-- End Class with ID -->
<!-- Class with class -->
<div is-click="class:add('show1', '.menu1')">add</div>
<div is-click="class:remove('show2', '.menu2')">remove</div>
<div is-click="class:toggle('show3', '.menu3')">toggle</div>
<!-- End Class with class -->
<!-- Class with tag -->
<div is-click="class:add('show1', 'a')">add</div>
<div is-click="class:remove('show2', 'li')">remove</div>
<div is-click="class:toggle('show3', 'button')">toggle</div>
<!-- End Class with tag -->
<!-- Class with ID -->
<div is-scroll-up="class:add('show1', '#menu1')">add</div>
<div is-scroll-up="class:remove('show2', '#menu2')">remove</div>
<div is-scroll-up="class:toggle('show3', '#menu3')">toggle</div>
<!-- End Class with ID -->
<!-- Class with class -->
<div is-scroll-up="class:add('show1', '.menu1')">add</div>
<div is-scroll-up="class:remove('show2', '.menu2')">remove</div>
<div is-scroll-up="class:toggle('show3', '.menu3')">toggle</div>
<!-- End Class with class -->
<!-- Class with tag -->
<div is-scroll-up="class:add('show1', 'a')">add</div>
<div is-scroll-up="class:remove('show2', 'li')">remove</div>
<div is-scroll-up="class:toggle('show3', 'button')">toggle</div>
<!-- End Class with tag -->
<!-- Class with ID -->
<div is-scroll-down="class:add('show1', '#menu1')">add</div>
<div is-scroll-down="class:remove('show2', '#menu2')">remove</div>
<div is-scroll-down="class:toggle('show3', '#menu3')">toggle</div>
<!-- End Class with ID -->
<!-- Class with class -->
<div is-scroll-down="class:add('show1', '.menu1')">add</div>
<div is-scroll-down="class:remove('show2', '.menu2')">remove</div>
<div is-scroll-down="class:toggle('show3', '.menu3')">toggle</div>
<!-- End Class with class -->
<!-- Class with tag -->
<div is-scroll-down="class:add('show1', 'a')">add</div>
<div is-scroll-down="class:remove('show2', 'li')">remove</div>
<div is-scroll-down="class:toggle('show3', 'button')">toggle</div>
<!-- End Class with tag -->
<!-- Class with ID -->
<div is-hover="class:add('show1', '#menu1')">add</div>
<div is-hover="class:remove('show2', '#menu2')">remove</div>
<div is-hover="class:toggle('show3', '#menu3')">toggle</div>
<!-- End Class with ID -->
<!-- Class with class -->
<div is-hover="class:add('show1', '.menu1')">add</div>
<div is-hover="class:remove('show2', '.menu2')">remove</div>
<div is-hover="class:toggle('show3', '.menu3')">toggle</div>
<!-- End Class with class -->
<!-- Class with tag -->
<div is-hover="class:add('show1', 'a')">add</div>
<div is-hover="class:remove('show2', 'li')">remove</div>
<div is-hover="class:toggle('show3', 'button')">toggle</div>
<!-- End Class with tag -->
<!-- Class with ID -->
<div is-visible="class:add('show1', '#menu1')">add</div>
<div is-visible="class:remove('show2', '#menu2')">remove</div>
<!-- End Class with ID -->
<!-- Class with class -->
<div is-visible="class:add('show1', '.menu1')">add</div>
<div is-visible="class:remove('show2', '.menu2')">remove</div>
<!-- End Class with class -->
<!-- Class with tag -->
<div is-visible="class:add('show1', 'a')">add</div>
<div is-visible="class:remove('show2', 'li')">remove</div>
<!-- End Class with tag -->
<!-- Class with ID -->
<div is-not-visible="class:add('show1', '#menu1')">add</div>
<div is-not-visible="class:remove('show2', '#menu2')">remove</div>
<!-- End Class with ID -->
<!-- Class with class -->
<div is-not-visible="class:add('show1', '.menu1')">add</div>
<div is-not-visible="class:remove('show2', '.menu2')">remove</div>
<!-- End Class with class -->
<!-- Class with tag -->
<div is-not-visible="class:add('show1', 'a')">add</div>
<div is-not-visible="class:remove('show2', 'li')">remove</div>
<!-- End Class with tag -->
<!-- Errors -->
<div is-click="class:dd('show1', '.menu1')">add</div>
</body>
</html>