Solved Change border colour of original poster to match category

  • One simple feature I wanted in Sudonix was for the border of the first post in a new thread to match the colour set by the category. This makes the first post stand out, and looks nice too 🙂

    The code is based around the same functionality here

    It’s relatively simple in it’s approach. Here is is

    $(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);

    Essentially, this jQuery snippet looks for the role="presentation" attribute in the topic stream (there’s only the one, so no need for any loop to detect all of them like we do in the previous link), grab the CSS value, and then set it as the border so it looks like this


    All you need to do is copy the snippet, and place this in your ACP -> Appearance -> Custom JS


  • Topic has been marked as solved  phenomlab phenomlab 
  • Referenced by  phenomlab phenomlab 

If this topic and the associated threads resolved an issue for you, or was useful, why not buy me a coffee? It's a nice gesture, and there's other ways to donate if you wish 💗

Discover More

  • 25
  • 4
  • 5
  • 7
  • 10
  • 9
  • 6
  • 25