Solved

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

Posted on 2011-03-16
1
362 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
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
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).

790 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