GithubHelp home page GithubHelp logo

event-dom-practice's Introduction

Dynamic AirBnB Page

DOM and Event Practice

Start with the starter code- Nick's solution to the AirBnB exercise.

Refer back to the gitbook section on DOM and Events. DOM Manipulation Events

  • Attach a click event listener to the See All Guidebooks button. Alert the user that this feature isn't done yet.
  • Attach a click event listener to the See All Destinations button. Alert the user that this feature isn't done yet.
  • Attach a click event listener to each desitination square. Inside the callback function, use window.open to trigger a new window with a google map page of that destination.
  • Example url (just copy the entire url from the address bar): https://www.google.com.sg/maps/place/Sonoma,+CA+95476,+USA/@38.291092,-122.4666091,14z/data=!3m1!4b1!4m5!3m4!1s0x8085ac43817b9d77:0x380ed210ee6e045!8m2!3d38.291859!4d-122.4580356?hl=en

Further 1

  • Using this HTML
<input id="destination-search" type="text"/>
<button id="submit-destination">
  submit
</button>
  • Create a search input that will open a new window (as it does in the task above) when the user types in one of the destinations and clicks submit

Further 2

  • Using the change event on the input detect when the user has entered a valid destination name, and open the window (without the need to click the submit button);

Further 3

  • alert the user that they have not entered a valid destination name, and clear the input so that they can try again.

Further 4

  • Create a div and show the user a message that they have not entered a valid destination. Style the messgae in red, so the user knows it's serious.

event-dom-practice's People

Contributors

awongh avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.