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.

about the topics list

3 posters

Go down

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");
};
});
avatar
Ahmed.K
Forumember

Posts : 349
Reputation : 4
Language : English

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

about the topics list Empty Re: about the topics list

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

I made it.
avatar
Ahmed.K
Forumember

Posts : 349
Reputation : 4
Language : English

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

about the topics list Empty Re: about the topics list

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

how?
avatar
Ahmed.K
Forumember

Posts : 349
Reputation : 4
Language : English

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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?
avatar
Ahmed.K
Forumember

Posts : 349
Reputation : 4
Language : English

Back to top Go down

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".
Sr.Smith
Sr.Smith
Forumember

Posts : 94
Reputation : 11
Language : Spanish

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum