iOS bug - input search type
by sas_sam
HTML
<div id="container">
<p>Search input field:
<input type="search" id="inputSearch" placeholder="eg.: hello world" />
</p>
<p> <a href="#" class="link-hover">Link with hover style</a>
</p>
<p>
<button id="btn" class="button-normal">Simple button</button>
</p>
<p>
<input type="button" id="inputButton" class="button-normal" value="input button" />
</p>
<p>Sample text</p>
<label for="cb">
<input type="checkbox" id="cb" />Simple checkbox - clicked: <span id="counter">0</span>
</label>
</div>
CSS
#container {
position: relative;
}
#container .link-group *:hover{
color: #00F;
text-decoration: underline;
}
.link-hover {
color: #0C0;
text-decoration: none;
}
.link-hover:hover {
color: #f00;
}
.button-normal {
width: 200px;
background-color: #09F;
height: 50px;
padding: 10px;
text-align: center;
color: #FFF;
font-size: 16px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
line-height: 30px;
vertical-align: middle;
cursor: pointer;
font-weight: bold;
}
#inputSearch {
font-size: 14px;
line-height: 40px;
color: #333;
background-color: #FFF;
vertical-align: middle;
padding: 5px;
height: 40px;
border: 1px solid #CCC;
}
.button-normal:hover {
border: 3px solid #03C;
}
.button-normal:active {
border: 3px solid #F90;
background-color: #FC0;
}
label {
cursor: pointer;
}
}
JavaScript
$(".link-hover").click(function (e) {
e.preventDefault();
alert("click on link");
});
$("#btn").click(function (e) {
e.preventDefault();
alert("Button click");
});
$("#inputButton").click(function (e) {
e.preventDefault();
alert("Input button click");
});
var counter = 0;
$("#cb").click(function () {
counter++;
$("#counter").text(counter);
});