High-Lighting the href tag that was Clicked Last in DataList in .Net

Hi Team,

I want to highlight href tag when I click it. As of now I am able to highlight it on mouse over but in order to keep it highlighted what I can do ?

In the below code I am using "categoryID" as href, on mouse over I can make it highlighted but after click how can I keep it highlighted ?

<div class="leftlinkpan">
                        Projects Category
                            <asp:DataList ID="DlProject1" runat="server" RepeatColumns="1" RepeatDirection="Horizontal"
                                        <a href='Project3.aspx?categoryID=<%#Eval("categoryID")%>' class="active">

 Looking forward to hearing from you.
Who is Participating?
jayakrishnabhConnect With a Mentor Commented:
            $("a").click(function () {
                $(this).css("color", "red");
                $(this).css("background-color", "yellow");
deepu chandranCommented:
satmishaAuthor Commented:
I'll appreciate if you could provide some exaple/code. I tried above one but couldn't get the success.
satmishaAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.