Solved

highlight H3 tags on hover + remain highlighted on last selected H3 tag

Posted on 2011-03-16
1
364 Views
Last Modified: 2012-05-11
http://test.production.esa.edu.au/ndlrn/ndlrncatalog/final.html

At the moment, when this page is loaded the first time, all the H3 elements are highlighted grey, when clicked on it becomes white. I would like this to be the other way around, but only highlight grey for the last selected H3 tag.

Also, it would be good if the H3 tags are highlighted on hover.

0
Comment
Question by:jeremyll
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
GregArnott earned 500 total points
ID: 35161036
It seems the highlighting process has been fixed using classes (ui-state-hover) etc.

As for "last selected" this can easily be addressed using jQuery's .toggleClass(), or addClass/removeClass.

Create a selected class with the colouring required, then either as part of the .click() event handler already in place for the H3 elements, else your own, use toggleClass or removeClass/addClass to remove current H3.selected, and apply it to the one clicked.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to build a web site 17 57
How do I Enable submit button only if listbox has items 4 34
calculate days away 11 28
Can't get video to center on page 2 15
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime is disastrous for companies and can lead to major hits on a brand, reputation, an…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

733 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