I need assistance with adding a selector on my webpage where users can choose one option and retrieve the id of the selected part. This id will then be used in a link. I am new to using jQuery, so I am having trouble implementing this feature. Below is an example of the code structure:
Selector 1
<div class="col-xs-4 col-md-2">
<div id="" class="cuadro center su-signo">
<img src="" class="img-responsive" alt="">
<div class="titulo">
<h3 class="red"><small></small></h3>
</div>
</div>
</div>
...
Selector 2
<div class="col-xs-4 col-md-2">
<div id="" class="cuadro center tu-signo">
<img src="" class="img-responsive" alt="">
<div class="titulo">
<h3 class="red"><small></small></h3>
</div>
</div>
</div>
...
Jquery implementation so far:
<script>
var me = "";
var th = "";
$(".tu-signo").on('click',function() {
me = $(this).attr("id");
$(this).css('-webkit-filter','brightness(50%)');
});
</script>
If you have any suggestions or solutions, please let me know. Thank you!