JS Hovering problem...

1 replies
  • WEB DESIGN
  • |
I have tried several different things but none of them are working.. I have been staring at this for 2 hours... I am a php PROGRAMMER but I need to learn JS so any help is DEEPLY appreciated! If anyone is interested in mentoring please PM me...

The Problem:
I want the div to transition on mouseover to one class "hover-pane transition" and on mouseout to class "content-pane 'this.id' transition" or to simply revert the class.

The code below is what I am currently using and it doesn't work:

The javaScript:

<script type="text/javascript">
function changeClassHoverPane(){
var elementId;
elementId=this.id;
this.className='content-pane "elementId" transition';
}
</script>

The HTML:

<div class="content-container">
<div class="content-pane 1 transition" id="c-1" onmouseover="this.className='hover-pane transition';" onmouseout="setTimeout(changeClassHoverPane, 2000);" >
<a class="transition" href="http://www.thephpboss.com/">The php boss dot com is here......</a>
</div>


Here is a link to the page:

ThePhpBoss Web programming, and Web development
#css #hovering #javascript #problem

Trending Topics