The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
3 posters

    about the topics list

    avatar
    Ahmed.K
    Forumember


    Posts : 347
    Reputation : 4
    Language : English

    about the topics list Empty about the topics list

    Post by Ahmed.K December 18th 2015, 5:28 am

    I want add a background color for the "tr" in the topics list area with the new posts icon ... but this code doesn't work .. any ideas?

    Code:
    $(document).each(function() {
    var img = $(".status img");
    if (image.getAttribute('src')=="newpost.png") {
    $('tr').css("background-color","#e6e9ee");
    };
    });
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    about the topics list Empty Re: about the topics list

    Post by SLGray December 18th 2015, 6:16 am

    Where did you get that code?



    about the topics list Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    Ahmed.K
    Forumember


    Posts : 347
    Reputation : 4
    Language : English

    about the topics list Empty Re: about the topics list

    Post by Ahmed.K December 18th 2015, 7:24 am

    I made it.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    about the topics list Empty Re: about the topics list

    Post by SLGray December 18th 2015, 6:26 pm

    Have you tried using CSS?



    about the topics list Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    Ahmed.K
    Forumember


    Posts : 347
    Reputation : 4
    Language : English

    about the topics list Empty Re: about the topics list

    Post by Ahmed.K December 18th 2015, 11:00 pm

    how?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    about the topics list Empty Re: about the topics list

    Post by SLGray December 19th 2015, 2:31 am

    Please post your forum's link.  Are you referring to the area where the category title is?



    about the topics list Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    Ahmed.K
    Forumember


    Posts : 347
    Reputation : 4
    Language : English

    about the topics list Empty Re: about the topics list

    Post by Ahmed.K December 19th 2015, 10:04 pm

    SLGray wrote:Ok. You are talking about the topic list in sub-forums.
    Yes. now any ideas?
    Sr.Smith
    Sr.Smith
    Forumember


    Posts : 94
    Reputation : 11
    Language : Spanish

    about the topics list Empty Re: about the topics list

    Post by Sr.Smith December 20th 2015, 11:42 am

    Hi Ahmed.K, I don't see your forum version or your Forum address so I have to suppose that it is punBB

    For that version you can try this javascritp in "all pages"

    Code:
    $(function() {
        if ($(".status img").length) {

            /**** Beginning of editable zone ***/
            var URLiconNewPost = "http://2img.net/i/fa/prosilver/topic_unread_hot.gif";
            var NewPostTrColor = "#e6e9ee";
            /**** End of editable zone ***/
            var img = $(".status img");
            img.each(function() {
                if ($(this).attr('src') == URLiconNewPost) {
                    $(this).closest('tr').find('td').css("background-color", NewPostTrColor);
                };
            })
        }
    });

    You must fill your information in the "editable zone".

      Current date/time is November 13th 2024, 7:23 pm