3
I have a problem implementing this simulation, is the following, the user chooses the package by clicking on one of these boxes (monthly, quarterly, semi-annual or annual) then choose in select the number of points and wanted there to be the multiplication of these data showing in the last box where has the 306 via Javascript or using the Jquery library.
<!-- TIPO DE PLANO -->
<a href="" class="ico_planos">
<div class="col-md-3">
<header>
<p>Mensal</p>
</header>
<section class="valor">
<p><span>R$</span>170<span>,00</span></p>
</section>
</div>
</a>
<!-- QUANTIDADE QUE ESCOLHER -->
<select name="qntdPlayers" id="selectQntdPlayers">
<option value="1">01 Ponto</option>
<option value="3">03 Pontos</option>
<option value="6">06 Pontos</option>
<option value="9">09 Pontos</option>
<option value="10">10 ou mais Pontos</option>
</select>
<!-- DENTRO DA DIV simulacaoValorTotal eu gostaria de mostrar o resultado da multiplicação de valor x value escolhido -->
<section class="praquem">
<p><b style="color:#064e71">Valor do pacote</b></p>
<p class="simulacaoValorTotal">R$ 306,00/mês</p> <!-- <- MOSTRAR AQUI O RESULTADO DE TIPO DE PACOTE X QUANTIDADE ESCOLHIDA (170X1 = 170) -->
</section>
you can pick up the value by using
$("#caixa_1").html()
, This takes the contents inside the box.– Brumazzi DB
@Tyago the question has improved a lot with editing, welcome to the site and thank you for your attention in improving the post. With the code in the body of the post, it’s easier for the community to copy and paste into tests.
– Bacco
How long is membership time links? For, one would know first which plan was selected and then mark the value. But I didn’t quite understand your print and code posted with is the selection of packages. Because if packets are used in a kind of input radio Voce would use
$("#myform input[type='radio']:checked").val();
to know which package was selected and would use$( "#myselect option:selected" ).val();
to know the value of points, considering that all values must be in thevalue
of each element in question.– Gabriel Garcia
Hello @Gabriel Garcia, membership time is yes links! I put only one there that is related to the monthly, the others (quarterly, biannual and annual) tmbm are the same code the only thing that changes is the value in R $ package. the steps that the user would have to do is the following: 1 - Click on the package (which is inside a link); 2 - Click on the select and choose the option (these have the value referent); 3 - Calculate by multiplying the value in R$ of each X package the value that are within the select options 4 - Show the result of that multiplication la in the last frame
– Tyago Veras
Send me his complete code so I can see how it works, with all the links and I’ll get back to you.
– Gabriel Garcia