Git Product home page Git Product logo

thursday_morning_peer_challenge's Introduction

super_gross_javascript

#Super Gross JavaScript Master# ###AKA MabLibs Knockoff!###

  1. In this assignment we start with a button on the screen that is inactive, we did this by using $(".generate").prop("disabled", true);. This was just put right into the html. Where .generate is the button.
  2. Next we created three separate json files where we had an array of different words.
  3. We then needed to create an ajax call within our document ready.
  • We actually created three separeate ajax calls where we are calling in our three different files.
  • Upon testing and seeing which call ran last (the last in the file) we put a complete: function which changed the button from disabled true, to disabled false.
  1. Then we declared three separarate arrays above our document ready. They are all empty for now.
  2. Inside of our ajax functions we added a line that pushed the words into our different arrays.
  3. Next We just created a random number function, which would spit out a random number and return it.
  4. Then we have a click event on the generate button which:
  • sets a variable for a random number by doing this: getRandomNumber(0,9)
  • with this variable we created another one where we are actually finding indece in the array of that number. Setting it to that new variable. Which upon console loging we see the random words are stored.
  1. Finally we are able to append our new random words onto the DOM below our button.
  2. One final task is to remove the words when the button is clicked again.
  3. Whalla!!!!! MAGIC!

##Heroku Link### https://quiet-tor-4135.herokuapp.com/

thursday_morning_peer_challenge's People

Contributors

sdoire avatar

Watchers

James Cloos 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.