0
as I do for when I click on checkbox it dynamically mark an image with edge. I’m trying to do but it always marks all the img how could I do that. Note: mine img comes from the bank this all dynamic.
dynamic part php:
<div class="btn-group" data-toggle="buttons">
<label class="check btn btn-primary">
<input type="checkbox" name="ck[]" value="$imagem" id="$id"> Selecionar
</label>
<div>
jquery part
$(".check").click(function(){
$("img").toggleClass('clic');
});
Obs. with this code I can mark the img however all and not and that I want I wanted to mark only the respective ones I click. example c I click on the first img mark only her and then if I mark the fifth img mark only her. at the end I will have 2 marked that I chose to img 1 and 5
full php code:
require"sys/conexao.php";
$nome = $_GET['noivos'];
$nomeurl = $_GET['noivos'];
$sql = mysqli_query($mysqli, "SELECT * FROM galeria WHERE email = '$nome'");
while($aux = mysqli_fetch_assoc($sql)){
$titulo = $aux['nome_galeria'];
$imagem = $aux['img'];
$img_big = $aux['img_big'];
$id = $aux['id'];
$_SESSION['id'] = $id;
print"
<div class=\"col-lg-3 col-md-4 col-sm-6 col-xs-12\">
<div class=\"hovereffect\">
<img class=\"img-responsive\" src=\"images/small/selecao/$imagem\" alt=\"\">
<div class=\"overlay\">
<div class=\"pad\">
<h2>$titulo</h2>
<a class=\"info test-popup-link\" href=\"images/big/selecao/$img_big\"><span class=\"corr\"><i class=\"fa fa-search\"></i></span></a>
<div class=\"btn-group\" data-toggle=\"buttons\">
<label class=\"check btn btn-primary\">
<input type=\"checkbox\" name=\"ck[]\" value=\"$imagem\" id=\"$id\"> Selecionar
</label>
</div>
</div>
</div>
</div>
</div>";
}
mysqli_close($mysqli);
that value $image is the values of
imgthat guy select to send to the bank. you want to see the entire code where with thephpGero asimgdynamically?– Leonardo Costa
yes show all the code
– Guerra
ok vo edit the Perg
– Leonardo Costa
edite a Perg olha la
– Leonardo Costa
I guess now it will =]
– Guerra
doesn’t keep picking up overall scoring
– Leonardo Costa
would have no way of locating the
checkboxthat is marked and play theborderinimgcorresponding to thecheckboxMarked? Then he’ll just pick up bycheckedHe can’t find it until he’s gonecheckedhe marks theimgthat this checked– Leonardo Costa
I switched to $(".check"). click(Function(){ $(this).Closest('img').toggleClass('clic'); }); try
– Guerra
now it was only that I had to trade this img in the Closest for hovereffect my class
– Leonardo Costa