Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# Javascript jQuery
<div class="sup_nav alignleft" id="add">
                    <li class="one"><a href="../MasterData/AddEditCitizen.aspx" class="top"><span></span>
                        Main Menu</a></li>
                    <li class="two"><a href="../MasterData/ListClient.aspx" title="Setup Client"><span
                        class="menu1"></span>Setup Client</a></li>
                    <li class="three"><a href="../MasterData/ListCountry.aspx" title="Setup Country"><span
                        class="menu2"></span>Setup Country</a></li>
                    <li><a href="../MasterData/ListState.aspx" title="Setup State"><span class="menu3"></span>
                        Setup State</a></li>
                    <li><a href="../MasterData/ListCity.aspx" title="Setup City"><span class="menu4"></span>
                        Setup City</a></li>
                    <li><a href="../MasterData/ListTown.aspx" title="Setup Town"><span class="menu4"></span>
                        Setup Town</a></li>
                    <li><a href="../MasterData/ListBooth.aspx" title="Setup Booth"><span class="menu4"></span>
                        Setup Booth</a></li>
                    <li><a href="../Project/ListProject.aspx" title="Setup Project"><span class="menu6">
                    </span>Setup Project <em></em></a>
                            <li><a href="#" title="Setup Milestone">Setup Milestone</a></li>
                            <li><a href="#" title="Setup Task">Setup Task</a></li>
                            <li><a href="#" title="Setup Sub-Task">Setup Sub-Task</a></li>
                            <li><a href="#" title="First varifiaction">First varifiaction</a></li>
                            <li><a href="#" title="Enter Candidate">Enter Candidate</a></li>
                            <li><a href="#" title="Organize Election">Organize Election</a></li>
                    <li><a href="../Team/SetupTeam.aspx" title="Setup Team"><span class="menu7"></span>Setup
                        Team <em></em></a>
                            <li><a href="../Team/AddTeamMembers.aspx" title="Assign Team Members">Assign Team Members</a></li>
                            <li><a href="../Team/AddTeamBooth.aspx" title="Assign Team booth">Assign Team booth</a></li>
                            <li><a href="#" title="Assign Task">Assign Task</a></li>
                    <li><a href="#" title="Setup Political party"><span class="menu8"></span>Setup Political
                    <li><a href="#" title="Candidate entry"><span class="menu9"></span>Candidate entry</a></li>
                    <li><a href="../Enrollment/CitizenEnrollment.aspx" title="Citizen entry"><span class="menu9">
                    </span>Citizen Enrollment</a></li>
                    <li><a href="#" title="Voting"><span class="menu10"></span>Voting</a></li>
Posted 26-Dec-12 20:14pm
Sergey Alexandrovich Kryukov at 27-Dec-12 2:21am
What is "active"? Do you mean the Web browser window activated? And what if the user put it in a tab?
I don't think it makes sense; and I don't think this is possible. This is some client-only detail not accessible by Web application. And this is good. Leave a user to be a master of her/his environment.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Directly from is an example for you:
$("div").click(function () { 
  var color = $(this).css("background-color"); 
  $("#result").html("That div is <span style="color:" + <br mode="hold" />                     color + ";">" + color + "</span>."); 
Visit the site for the entire example.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 210
1 Richard MacCutchan 100
2 kbrandwijk 90
3 ProgramFOX 80
4 Mukesh Bhagat 65
0 Sergey Alexandrovich Kryukov 9,050
1 OriginalGriff 8,151
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928

Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100