I have 2 search fields, ( choose a place ) ( number of people) and a button Search, if the choose a place is not choosen and the search is clicked the bootstrap tooltip should say Please choose a place, But I cannot for some reason accomplish this task and need help . This is my code for the search field and button .
<div class="col-md-4 col-md-offset-4 hidden-xs hidden-sm " style="margin-top:50px;">
<div class="row">
<form action="/Places/view" id="PlaceDisplayForm" method="get" accept-charset="utf-8">
<!--<form method="get" action="Places/view">-->
<div class="col-md-4" style="margin-bottom:15px; padding:0;">
<select name="place" class="form-control" style = "padding: 5px 5px;">
<div id="myToolTip" data-toggle="tooltip" title="Choose a Place">
<option>Choose a Place </option>
</div>
<option>Helsinki</option>
<option>Lapland</option>
</select>
</div>
<div class="col-md-5" style="margin-bottom:15px;">
<select name="people" class="form-control" style = "padding: 5px 5px;">
<option>Number of People</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>10+</option>
</select>
</div>
<div class = "col-md-3" >
<input type="submit" class="btn button-bookndo form-control" value="Search" >
</div>
</form>
</div>
</div>
And this is my script
<script type="text/javascript">
$('document').ready(function(){
$('myTooltip').tooltip();
});
</script>
Of course the tooltip
is not showing on the choose a place when the Search button is clicked, and the script is also not working.