Here is my JavaScript code snippet:
$('.normal-box').click(function(){
//unique row id
var id = $(this).data('row-id');
//its index according to the content array
var index = $(this).data('index');
//which card does this row belong to
var card_name = $(this).data('id');
var card;
console.log(id) //el id de noten es de por si "link last_updated" concatenado
switch(card_name){
case "noten" : card = Unidos.CardManager.getCard(card_name); break;
case "nachricht" : card = Unidos.CardManager.getCard(card_name); break;
default : return false;
}
card.resetPriorityWhenClickedOn(id);
});
And here is the HTML part:
<script id="nachricht_card_row_template" type="text/html">
<div class="normal-box" data-row-id="{{id}}">
<div class="img-box">
{{#if channel.image}}
<img src="{{channel.image}}" vspace="3">
{{/if}}
</div>
<div class="subtitle-box" id="nachrichten-subtitle-box">
<span class="options-title" id="title-text">{{channel.name}}</span>
</div>
<div class="side-text-box">
<span class="side-text">{{formatDate datetime}}</span>
</div>
<div class="small-text">
<div class="normal-text"><span class="text-formating">{{text}}</span></div>
</div>
</div>
</script>
This is the CSS section:
.normal-box{ /*Container of other tiny boxes*/
height: 70px;
border-bottom: 1px solid;
border-bottom-color: gainsboro;
overflow: hidden;
opacity: 0;
transition: opacity 0.5s ease 0.3s;
}
.normal-box.show{
opacity: 1;
}
If you notice in the last part, I am facing a challenge selecting elements with multiple classes like .normal-box show
. Here are some things I have tried:
$('.normal-box, .normal-box show)
$('.normal-box, .show)
$('.normal-box.normal-box show)
$('.normal-box.show)
Unfortunately, none of them seem to work for me. Any assistance would be highly appreciated.