Solved

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

Posted on 2014-04-09
4
305 Views
Last Modified: 2014-04-23
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">
                    <h6>
                        Projects Category
                    </h6>
                    <ul>
                   
                        <li>
                            <asp:DataList ID="DlProject1" runat="server" RepeatColumns="1" RepeatDirection="Horizontal"
                                OnItemDataBound="DlProject1_ItemDataBound">
                                <ItemTemplate>
                                 
                                        <a href='Project3.aspx?categoryID=<%#Eval("categoryID")%>' class="active">
                                            <%#Eval("categoryName")%>
                                        </a>
                           
                                </ItemTemplate>
                            </asp:DataList>
                     
                        </li>
                    </ul>
                </div>

 Looking forward to hearing from you.
0
Comment
Question by:satmisha
  • 2
4 Comments
 
LVL 8

Expert Comment

by:deepu chandran
Comment Utility
0
 
LVL 5

Accepted Solution

by:
jayakrishnabh earned 265 total points
Comment Utility
<script>
 $(document).ready(function(){            
            $("a").click(function () {
                $(this).css("color", "red");
                $(this).css("background-color", "yellow");
            });
        });
</script>
0
 

Author Comment

by:satmisha
Comment Utility
I'll appreciate if you could provide some exaple/code. I tried above one but couldn't get the success.
0
 

Author Closing Comment

by:satmisha
Comment Utility
Thankx
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now