hi @phenomlab , somehow recent cards are not clickable in my forum after using these codes, however, it works fine here…
Normally, when I click a card it takes me to that topic, however, nothing happens now.
I use this CSS:
li.col-md-3.col-sm-6.col-xs-12.recent-card-container {
width: 290px !important;
}
this JS code:
$(document).ready(function() {
$(window).on('action:ajaxify.end', function(data) {
$('.recent-card-container').each(function(i) {
var dataId = $(this).attr("data-cid");
var color = $('[role="presentation"]', this).css("background-color");
console.log("data-cid " + dataId + " is " + color);
$('[data-cid="' + dataId + '"] .recent-card').attr("style", "border-color: " + color);
});
});
});
$(document).ready(function() {
$(window).on('action:ajaxify.end', function(data) {
var categoryColor = $('[role="presentation"].icon').css("background-color");
$('li.topic-owner-post:nth-child(1)').css('border-color', categoryColor);
});
});
window.addEventListener("load", () => {
// CHROME
if (navigator.userAgent.indexOf("Chrome") != -1) {
console.log("Google Chrome");
$(window).on('action:ajaxify.end', function(data) {
$('.carousel-mode').bxSlider({
auto: false,
autoControls: true,
stopAutoOnClick: true,
pager: false,
keyboardEnabled: true,
touchEnabled: false
});
});
} else {
console.log("Others");
$(window).on('action:ajaxify.end', function(data) {
$('.carousel-mode').bxSlider({
auto: false,
autoControls: true,
stopAutoOnClick: true,
pager: false,
keyboardEnabled: true,
touchEnabled: true
});
});
}
});
and this header:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.min.js"></script>