Skip to main content

How to make pop up with reactjs

How to make a pop-up information box when you click an element. Example like this image : Before Click

After Click

Like this image, you click "View all study equipment" an element and then get that pop-up for more information.

This is my code :

<>
  <div className="description-container">
    <div className="nav-tab">
      <ul className="description-tab">
        <li>
          <a href="/" className="active">
            Class Description
          </a>
        </li>
        <li>
          <a href="/">Testimony</a>
        </li>
        <li>
          <a href="/">FAQ</a>
        </li>
      </ul>
    </div>
  </div>

  <div className="description-info">
    <div className="desc-list">
    <h2>Description</h2>
    <p>
      Websites in today's era have become a major need that cannot be
      ignored. All business or education sectors can use the website as a
      tool for promotion, exchange of information, and others. Based on data
      from the World Wide Web Technology Surveys, of all active websites,
      88.2% use HTML, 95.6% use CSS and 95% use JavaScript. This class
      thoroughly discusses the basics of HTML, CSS and JavaScript as the
      three foundations of website creation.
    </p>
    <ul>
      <li>
        <p>The web is a platform that can be accessed through many kinds of devices. This is an advantage if you develop Web-based applications.</p>
      </li>
      <li>
        <p>Web development does not require a computer/laptop that has high specifications, so it is not an obstacle for those of you who do not have a capable device.</p>
      </li>
      <li>
        <p>The website is a platform that is reached by search engines such as Google Search, so the website is suitable as a medium for promoting business or content.</p>
      </li>
      <li>
        <p>Developing a website includes development that is easy to maintain and easy to publish.</p>
      </li>
    </ul>
    </div>
    <div className="specs-description-info">
        <h4>Learning Equipment</h4>
        <h5><i class="fas fa-microchip"></i>Processor</h5>
        <span>Intel Celeron (Core i3 and above Recommended)</span>
        <h4>Tools yang dibutuhkan untuk belajar:</h4>
        <span><i class="fad fa-window"></i>Web Browser (Google Chrome atau Mozilla Firefox)</span>
        <br />
        <br />
        <a className="equip_info" href="/">View all study equipment</a>
    </div>
  </div>

  <div className="sub-border-description-info">
        <h3>Student Targets and Goals :</h3>
        <ul>
            <li>
                <p>This class is intended for beginners who want to start their career in the field of web development (web creation) and need a strong foundation or foundation before studying deeper in the web field, with reference to international standards owned by Google Developers.</p>
            </li>
            <li>
                <p>Classes can be attended by students who are IT literate so it is mandatory to have and be able to operate a computer well.</p>
            </li>
            <li>
                <p>This class is designed for beginners so there are no prerequisites in prior understanding of programming.</p>
            </li>
            <li>
                <p>Students must be able to learn independently, be committed, really have curiosity, and be interested in the subject matter, because no matter how good this class material is, it will not be useful without students' seriousness to learn, practice, and try.</p>
            </li>
        </ul>
    </div>
    <div className="subdescription-info">
        <h3>General and Specific Objectives of the Training :</h3>
        <ul>
            <li>
                <p>At the end of the training, participants can create a simple website using programming code that complies with global standards.</p>
            </li>
            <li>
                <p>Build a website using simple HTML, CSS, and JavaScript code.</p>
            </li>
            <li>
                <p>Implement a good website structure using standard semantic HTML.</p>
            </li>
            <li>
                <p>Demonstrating the preparation of website layouts using float or flexbox techniques.</p>
            </li>
        </ul>
    </div>
</>

Maybe you can share how to make it with React Javascript and CSS too. This is using newest react. Thank You

Via Active questions tagged javascript - Stack Overflow https://ift.tt/Tgl9aEZ

Comments

Popular posts from this blog

Prop `className` did not match in next js app

I have written a sample code ( Github Link here ). this is a simple next js app, but giving me error when I refresh the page. This seems to be the common problem and I tried the fix provided in the internet but does not seem to fix my issue. The error is Warning: Prop className did not match. Server: "MuiBox-root MuiBox-root-1" Client: "MuiBox-root MuiBox-root-2". Did changes for _document.js, modified _app.js as mentioned in official website and solutions in stackoverflow. but nothing seems to work. Could someone take a look and help me whats wrong with the code? Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW

How to show number of registered users in Laravel based on usertype?

i'm trying to display data from the database in the admin dashboard i used this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count(); echo $users; ?> and i have successfully get the correct data from the database but what if i want to display a specific data for example in this user table there is "usertype" that specify if the user is normal user or admin i want to user the same code above but to display a specific usertype i tried this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count()->WHERE usertype =admin; echo $users; ?> but it didn't work, what am i doing wrong? source https://stackoverflow.com/questions/68199726/how-to-show-number-of-registered-users-in-laravel-based-on-usertype

Why is my reports service not connecting?

I am trying to pull some data from a Postgres database using Node.js and node-postures but I can't figure out why my service isn't connecting. my routes/index.js file: const express = require('express'); const router = express.Router(); const ordersCountController = require('../controllers/ordersCountController'); const ordersController = require('../controllers/ordersController'); const weeklyReportsController = require('../controllers/weeklyReportsController'); router.get('/orders_count', ordersCountController); router.get('/orders', ordersController); router.get('/weekly_reports', weeklyReportsController); module.exports = router; My controllers/weeklyReportsController.js file: const weeklyReportsService = require('../services/weeklyReportsService'); const weeklyReportsController = async (req, res) => { try { const data = await weeklyReportsService; res.json({data}) console