top of page

Fetch data with Javascript - Get Projects Help In Javascript

This assignment is mainly how to fetch data and show in Website.

There is three button:

1:To see available houses.


2: To see houses in range.




3:To see houses in category wise



HTML Code

<div >
         <button class="button" onclick=Allhouses()>Click To see all houses</button>
        <div id='accordion'></div>
        
    </div>
    <div>

         <button class="button" onclick=Range()>Enter the Range</button>
        <div id='accordion2'></div>
    </div>
    <div>

         <button class="button" onclick=Category()>Enter the Category</button>
        <div id='accordion3'></div>
    </div>
    
    <script src='script.js'>


Javascript Code

unction Allhouses(){
    const container = document.getElementById('accordion');
container.style.display="flex"
container.style.flexWrap="wrap"
    TotalHouse= house.map((x,idx)=>{
        const card = document.createElement('div');
  card.classList = 'card-body';
  card.style.backgroundColor="black"
  card.style.width="400px"
  card.style.height="400px"
  //card.style.display="flex"
  const content = `
    <div class="card">
    <div class="card-header" id="heading-${idx}">
      <h5 class="mb-0">
        <button class="btn btn-link" data-toggle="collapse" data-target="#collapse-${idx}" aria-expanded="true" aria-controls="collapse-${idx}">

                </button>
      </h5>
    </div>

    <div id="collapse-${idx}" class="collapse show" aria-labelledby="heading-${idx}" data-parent="#accordion">
      <div class="card-body">
        <img src=${x.image}  backgroundColor="black" width="400px">
        <h2>House Name:${x.name}</h2>
        <h3>Price:Rs.${x.price}</h3>
        <h3>Category: ${x.category}</h3>
      </div>
    </div>
  </div>
  `;

For javascript assignment help mail us on contact@codersarts.com


Also, If you are looking for any kind of coding help in programming languages, web developing Contact us for instant solution


Comments


bottom of page