i have two tabs, one shows some hotel names from one location and other tab shows some hotels from another location.
and when i select one hotel from one tab and then another from another tab. the total should be hotel_location1 + hotel_location2.
here is my code:
for tabs:
<div class="tabs-x tabs-left">
<ul id="myTab-kv-13" class="nav nav-tabs" role="tablist">
<li class="active"><a target='_blank' href="#hotel-pb" role="tab" data-toggle="tab"><i class="fa fa-bed"></i> Port Blair</a></li>
<li><a target='_blank' href="#hotel-hl" role="tab-kv" data-toggle="tab"><i class="fa fa-bed"></i> Havelock</a></li>
</ul>
<div id="myTabContent-kv-13" class="tab-content">
<div class="tab-pane fade in active" id="hotel-pb">
<div class="col-md-3 col-xs-6">
<div class="panel panel-red">
<div class="panel-heading">velocity</div>
<div class="panel-body">
<img src="images/hotels/velocity.png" class="img-responsive"/>
<div class="my-caption">
<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star-empty"></span><span class="glyphicon glyphicon-star-empty"></span></div>
<select name="hotel_cat" id="hotel_cat_1" class="form-control" onchange="hotel_rate()">
<option value="">Category</option>
<option value="Standard Rs: 2000">Standard Rs: 2000</option>
<option value="Deluxe Rs: 2200">Deluxe Rs: 2200</option>
<option value="Family Rs: 3000">Family Rs: 3000</option>
</select>
<input type="hidden" name="sel_cat_1" id="sel_cat_1"/>
<br />
<button class="btn btn-block btn-danger" name="add_this_1" id="add_this_1" data-hname="velocity" data-elem="1" onclick="total_rate()">Select</button>
<input type="hidden" name="em_1" id="em_1" value="800"/>
<input type="hidden" name="s_tax_1" id="s_tax_1" value="8.4"/>
</div>
</div>
</div>
<div class="col-md-3 col-xs-6">
<div class="panel panel-red">
<div class="panel-heading">White Coral</div>
<div class="panel-body">
<img src="images/hotels/White Coral.png" class="img-responsive"/>
<div class="my-caption">
<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star-empty"></span><span class="glyphicon glyphicon-star-empty"></span></div>
<select name="hotel_cat" id="hotel_cat_2" class="form-control" onchange="hotel_rate()">
<option value="">Category</option>
<option value="Dlx Lake View Rs: 4500">Dlx Lake View Rs: 4500</option>
<option value="Dlx Mountain View Rs: 4000">Dlx Mountain View Rs: 4000</option>
<option value="Std Lake View Rs: 3500">Std Lake View Rs: 3500</option>
<option value="Std Mountain View Rs: 3000">Std Mountain View Rs: 3000</option>
</select>
<input type="hidden" name="sel_cat_2" id="sel_cat_2"/>
<br />
<button class="btn btn-block btn-danger" name="add_this_2" id="add_this_2" data-hname="White Coral" data-elem="2" onclick="total_rate()">Select</button>
<input type="hidden" name="em_2" id="em_2" value="800"/>
<input type="hidden" name="s_tax_2" id="s_tax_2" value="8.4"/>
</div>
</div>
</div>
<input type="hidden" name="count" id="count" value="3"/>
</div>
<div class="tab-pane fade" id="hotel-hl">
<div class="col-md-3 col-xs-6">
<div class="panel panel-red">
<div class="panel-heading">blue bird resort</div>
<div class="panel-body">
<img src="images/hotels/blue bird resort.png" class="img-responsive"/>
<div class="my-caption">
<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star-empty"></span><span class="glyphicon glyphicon-star-empty"></span></div>
<select name="hotel_cat" id="hotel_cat" class="form-control" onchange="hotel_rate()">
<option value="">Category</option>
<option value="Standard Rs: 2000">Standard Rs: 2000</option>
</select>
<input type="hidden" name="sel_cat_3" id="sel_cat_3"/>
<br />
<button class="btn btn-block btn-danger" name="add_this_3" id="add_this_3" data-hname="blue bird resort" data-elem="3" onclick="total_rate()">Select</button>
<input type="hidden" name="em_3" id="em_3" value="800"/>
<input type="hidden" name="s_tax_3" id="s_tax_3" value="8.4"/>
</div>
</div>
</div>
</div>
</div>
</div>
Please be nice. My first question here. I'm learning JavaScript and jQuery. Google isn't much help because I don't know how to ask the right question. Need human intervention please. I'm trying to ...
Please be nice. My first question here. I'm learning JavaScript and jQuery. Google isn't much help because I don't know how to ask the right question. Need human intervention please. I'm trying to ...
new Array // outputs [] [] // outputs [] But new Array === [] is false. Why so? console.log(new Array === [])
new Array // outputs [] [] // outputs [] But new Array === [] is false. Why so? console.log(new Array === [])
I've written a function to turn a string such as 'aaazeeeee' into a new string of 'aaa z eeeee' this is the code I've tried that works const groupCharacters = signature => { let ...
I've written a function to turn a string such as 'aaazeeeee' into a new string of 'aaa z eeeee' this is the code I've tried that works const groupCharacters = signature => { let ...
Is it possibile to use an inline return with javascript map function? Instead of doing array.map(token => { var x=new Object(); x[token]=words[token]; return x;} ) I would like to do it inline as ...
Is it possibile to use an inline return with javascript map function? Instead of doing array.map(token => { var x=new Object(); x[token]=words[token]; return x;} ) I would like to do it inline as ...