JavaScript How to change the style of one element when I hover another element (ReactJS)? change style element javascript,change style element jquery,change style

So basically when i hover over "drive" option which is a h1, i want a div container to appear that contains several other in detail options. Then if i click on "ride" option which is another h1, i want a div to appear as well that has more details and options. Only one can be chosen at a time, either ride/drive, but if i hover over ride, then the div that appears needs to stay until the mouse is off the div, if i hover over drive, then the drive div needs to appear. Hope you guys can help! Here is my code

import React, { Component } from 'react';
import './App.css';

class Header extends Component {
  render() {
    return (
      <div className="Nav">
        <header className="Nav-header">
          <h1 className="Nav-title">Halcon</h1>
          <p className="Nav-drive"><a target='_blank' href="*" className="Nav-link" onMouseEnter={this.mouseOver.bind(this)} onMouseLeave={this.mouseOut.bind(this)}>Drive</a></p>
          <p className="Nav-seperator">|</p>
          <p className="Nav-ride"><a target='_blank' href="*" className="Nav-link">Ride</a></p>
        </header>
         // Div i want to appear if Drive is hovered
        <div className="Drive-toggle">
          <h3>Why drive with us?</h3>
          <h3>Safety</h3>
          <h3>Requirements to Drive</h3>
          <h3>Driver App</h3>
          <h3>Driver - Log In</h3>
        </div>
        // Div i want to appear if Ride is hovered
        <div className="Ride-toggle">
          <h3>Why drive with us?</h3>
          <h3>Safety</h3>
          <h3>Requirements to Drive</h3>
          <h3>Driver App</h3>
          <h3>Driver - Log In</h3>
        </div>

      </div>
    );
  }
}

export default Header;
Answer:1

I have something like this: = f.input :payment_date, as: :date = f.input :tuitor, as: :boolean, label: 'Tuitor payment' and I want use on this a simple JavaScript like this: costam = -> if ...

I have something like this: = f.input :payment_date, as: :date = f.input :tuitor, as: :boolean, label: 'Tuitor payment' and I want use on this a simple JavaScript like this: costam = -> if ...

I was racking my head for a whole night trying to figure out why my code isn't working. I copied the code 2 times but the result was the same. The problem was sometimes when the snake eats an apple, ...

I was racking my head for a whole night trying to figure out why my code isn't working. I copied the code 2 times but the result was the same. The problem was sometimes when the snake eats an apple, ...

  1. snake game not working
  2. snapchat snake game not working
  3. google snake game not working
  4. working snake game

When I do new Date() I get: Thu Dec 28 2017 10:17:58 GMT+0800 (台北標準時間) If I apply .valueOf() to that date I get: 1514427724039 Which is what I want. Now, I need to apply .valueOf() to a date ...

When I do new Date() I get: Thu Dec 28 2017 10:17:58 GMT+0800 (台北標準時間) If I apply .valueOf() to that date I get: 1514427724039 Which is what I want. Now, I need to apply .valueOf() to a date ...

I am trying to change element class or any css property while dragging and it depends on elements position. So this is what i got so far: https://jsfiddle.net/twfegqgc/ So it changes when element ...

I am trying to change element class or any css property while dragging and it depends on elements position. So this is what i got so far: https://jsfiddle.net/twfegqgc/ So it changes when element ...

  1. change element class javascript
  2. change element class jquery
  3. change element class name javascript
  4. change element class on click
  5. change element class
  6. change element class angular
  7. change element class react
  8. change element class typescript
  9. change element class css
  10. change element class php
  11. change element class name
  12. change element class html
  13. change element class angularjs
  14. change element class in media query
  15. change element class using jquery
  16. javascript change element class
  17. change class element by id
  18. change class element vue
  19. change html element class javascript
  20. angular change element class on click