I'm successfully using the script below to open in the Visual DIV the products for the selected brand:
Trademark Link:
<a class="marca" style="cursor:pointer;" id="'.$res['codigo'].'">'.$res['nome_marca'].'</a>
Script for Marks:
<script language="javascript">
////// Visualiza o produto da Marca selecionada //////
$(document).ready(function(){
$('.marca').click(function(){
var cod = $(this).attr('id');
$.ajax({url:"prod_index_marca.php?codmarca="+cod,success:function(data){
$('#visual').html(data);
}
});
});
});
</script>
In the sequence, I would like to open the details of each selected Brand product within the Visual DIV for itself.
I used the same method to open the Tags, so:
Link to Product Details:
<a class="detalhe_5" style="cursor:pointer;" id="<?php echo $res['codigo']; ?>">
<img style="width:100%; max-width:100px;" src="img_produtos/<?php echo $res['img01']; ?>" />
</a>
Script for Details:
<script language="javascript">
////// Para visualizar o item selecionado //////
$(document).ready(function(){
$(".detalhe_5").click(function(){
var cod = $(this).attr("id");
$.ajax({
url:"prod_detalhe_5.php?codigo="+cod,success:function(data){
$("#visual").html(data);
}
});
});
});
</script>
But I'm not getting an answer, when I click on the link, the page stays static, or nothing happens.
Can I rely on friends to solve this problem?
I can not figure out why it does not work.