Having some trouble with bootstrap, so some help would be awesome. Thanks
What I would like:(top part)
Do not bind to element id, just use the 'previous' input element to clear.
CSS:
.clear-input > span {
position: absolute;
right: 24px;
top: 10px;
height: 14px;
margin: auto;
font-size: 14px;
cursor: pointer;
color: #AAA;
}
Javascript:
function $(document).ready(function() {
$(".clear-input>span").click(function(){
// Clear the input field before this clear button
// and give it focus.
$(this).prev().val('').focus();
});
});
HTML Markup, use as much as you like:
Pizza:
Pasta: