Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-03-16
1
Medium Priority
?
376 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 2000 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

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
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…

618 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