JSFiddle - React, Tailwind, and code Playground
HTML
<div class="searchbar">
<input type="text" id="search" placeholder="Type here" />
</div>
<div id="keyboard"></div>
<table id="table" class="table">
<thead><tr>
<th>ID</th>
<th>Title</th>
<th>Author</th>
<th>City</th>
</tr>
</thead>
<tbody>
<tr>
<td>41279</td>
<td>Poster number 1</td>
<td>Lorem Ipsum</td>
<td>Lorem Ipsum</td>
</tr>
<tr>
<td>41293</td>
<td>Poster number 2</td>
<td>Bacon Ipsum</td>
<td>Bacon Ipsum</td>
</tr>
<tr>
<td>41350</td>
<td>Poster number 3</td>
<td>Burger Ipsum</td>
<td>Burger Ipsum</td>
</tr>
</tbody>
CSS
@font-face {
font-family: "Berthold";
src: url("../fonts/berthold.ttf");
}
@font-face {
font-family: "Impact";
src: url("../fonts/impact.ttf");
}
html {
background-color: #000;
margin: 0 auto;
}
body {
margin:0 auto;
padding:0;
background-color:#EF8721;
background-repeat:repeat-x;
font-family: helvetica, arial, sans-serif;
}
a {
text-align: center;
color: #000;
}
h1 {
text-align: center;
font-size: 36px;
color: #000;
font-family: Impact;
font-weight: 300;
}
h2 {
text-align: center;
font-size: 36px;
color: #000;
font-family: Impact;
font-weight: 300;
}
#header {
text-align:left;
}
.nav-img {
float:right;
text-align: center;
margin: 5px auto;
width: 200px;
display: inline;
}
.nav-img img {
}
.nav-img p {
margin: 0 auto;
text-decoration: none;
color: #fff;
font-family: Berthold;
font-size: 30px;
}
.nav-img a {
text-decoration: none;
}
#header2 {
text-align:left;
height: 138px;
position: relative;
}
#header2 ul {
list-style-type: none;
display: inline-block;
margin: 0;
float: right;
padding-right: 5em;
}
#header2 ul li {
display: inline;
}
.nav-img2 {
float:left;
text-align: center;
margin: 0 auto;
width: 150px;
display: block;
}
.nav-img2 p {
margin: 0 auto;
text-decoration: none;
color: #fff;
font-family: Berthold;
font-size: 30px;
}
.nav-img2 a {
text-decoration: none;
}
.searchbar {
margin: 0 auto;
text-align: center;
}
.instruction {
font-size: 50px;
}
.title {
margin: 30px;
font-size: 60px;
}
.btn-prof {
border-radius: 5px;
box-shadow: 0px 1px 2px #000000;
background: #000;
padding: 10px 20px 10px 20px;
margin: 50px auto;
width: 450px;
height: 250px;
}
.btn-prof p {
display: inline-block;
color: #fff;
text-decoration: none;
font-size: 90px;
vertical-align: middle;
position: relative;
margin: 0;
padding-top: 10px;
padding-bottom: 10px;
font-family: Berthold;
line-height: 130%;
font-weight:...
JavaScript
// SEARCH FUNCTION BELOW - WORKS FINE WITH REGULAR KEYBOARD
$("#search").keyup(function(){
_this = this;
// Show only matching TR, hide rest of them
$.each($("#table tbody").find("tr"), function() {
console.log($(this).text());
if($(this).text().toLowerCase().indexOf($(_this).val().toLowerCase()) == -1)
$(this).hide();
else
$(this).show();
});
});
//BELOW IS THE VIRTUALKEYBOARD CODE - THE COMMENTS BELOW ARE FROM THE KEYBOARD AUTHOR
// the semi-colon before function invocation is a safety net against concatenated
// scripts and/or other plugins which may not be closed properly.
;(function ( $, window, document, undefined ) {
// undefined is used here as the undefined global variable in ECMAScript 3 is
// mutable (ie. it can be changed by someone else). undefined isn't really being
// passed in so we can ensure the value of it is truly undefined. In ES5, undefined
// can no longer be modified.
// window and document are passed through as local variable rather than global
// as this (slightly) quickens the resolution process and can be more efficiently
// minified (especially when both are regularly referenced in your plugin).
// Create the defaults once
var pluginName = "jkeyboard",
defaults = {
layout: "numbers_only",
input: $('#input')
};
var function_keys = {
backspace: {
text: ' ',
},
return: {
text: 'Enter'
},
shift:{
text: ' '
},
space: {
text: ' '
},
numeric_switch:{
text: '123',
command: function(){
this.createKeyboard('numeric');
this.events();
}
},
layout_switch:{
text: ' ',
command: function(){
var l = this.toggleLayout();
this.createKeyboard(l);
this.events();
}
},
character_switch:{
text: 'ABC',
command:...