i'm working with asp mvc 5
I have a javascript function that applies an action on a given class, for applied this function on a class I use the keyword this by being in this class, my problem is that I do not know how to use this function in any class at the same time, this is my javascript
function flipCard_1(el, dir) {
var flipcard = el.closest('div[class|="fsc-comp-flipcard"]');
if (dir == 1) {
var card_new_h = flipcard.children('div[class|="fsc-comp-card"]').eq(1).height();
flipcard.css('height', card_new_h).addClass('flipped');
}
else {
var card_new_h = flipcard.children('div[class|="fsc-comp-card"]').eq(0).height();
flipcard.css('height', card_new_h).removeClass('flipped');
}
}
I want that el supports any class that FSC-comp-card and applies javascript totu the same time