Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onclick=class ??

Status
Not open for further replies.

110287

Technical User
Feb 29, 2004
1
NO
A lot of pages have some sort of changes in links or other text when you move your mouse over. I can do this with pictures (js.), but how do you change the apperance of elemnts when you move your mouse over or simular? Could you change the css class with a onmouseover/onclick etc event?
 
You could use something like:
Code:
function hoverOver(obj){
	obj.className=obj.className+"hvr";
}
function hoverOut(obj){
	var curName=obj.className;
	obj.className=curName.substring(0,curName.lastIndexOf("hvr"));
}

... onmouseover="hoverOver(this);" onmouseout="hoverOut(this);" ...

Hope this helps.

Pete.


Web Developer & Aptrix / Lotus Workplace Web Content Management (LWWCM) Specialist
w: e: Pete.Raleigh(at)lclimited.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top