Unselect table cell on blur with jscript

Posted on 2011-10-09
Last Modified: 2012-05-12
Hi, I am trying to write the code for a table that when one of its cells is clicked it should highlight it, and when another cell is clicked then it should return the former cell to its original state and highlight the currently clicked cell. Any suggestions?
Question by:degaray
    LVL 40

    Accepted Solution

    check this code
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    			background-color: #5600ff;
    	<script src="jquery-1.4.2.min.js"></script>
    			<td> S.No </td> <td> name </td>  <td> age </td>  
    			<td> 1 </td> <td> Name 1 </td>  <td> Age 1 </td>  
    			<td> 2 </td> <td> Name 2 </td>  <td> Age 2 </td>  
    			<td> 3 </td> <td> Name 3 </td>  <td> Age 3 </td>  
    			<td> 4 </td> <td> Name 4 </td>  <td> Age 4 </td>  
    			<td> 5 </td> <td> Name 5 </td>  <td> Age 5 </td>  

    Open in new window

    LVL 4

    Author Closing Comment

    Thanks, that helped a lot!

    Featured Post

    Javascript: Crash Course

    Javascript is not only emerging as the most important language to know, it's flexibility is unique. With Javascript being deployed on the web, mobile and even the desktop this is the one language that all technologists need to know.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    gzip in express of nodejs 12 43
    Jump links not quite lining up 18 23
    CRM 2011 Decimal Out of Range 2 19
    Centering a div in html5 5 29
    Shoutout to Emily Plummer ( for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
    HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

    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

    22 Experts available now in Live!

    Get 1:1 Help Now