Solved

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

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

803 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