Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

760 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

18 Experts available now in Live!

Get 1:1 Help Now