jquery - How can I change the CSS (BG Color) of a specific element with JavaScript Hover events? -


please patient me, new programmer , extremely unfamiliar client-side programming. first live project , wish quite few things not have knowledge of.

the page in question can found @ http://paysonfirstassembly.com/

i attempting accomplish simple task. need change background color of specific element (can referred id, of course) when hovered over. know there other methods of doing this, frankly, brain fried being sick.

also, if helps, using jquery.

you use css, not jquery things this.

in stylesheet, add :hover selector css style of element. new style deceleration gets rendered when element hovered:

#original_element {   background-color: blue; }  #original_element:hover, .hover {   background-color: red; } 

to support poor people ie6 , js (this works without js too), can use jquery function:

$('#original_element').hover(function() {   $(this).addclass('hover'); }, function {   $(this).removeclass('hover');   }); 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -