Skip to content

JackCree/random-quote-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

random-quote-machine

Exercice with FreeCodeCamp Mooc

Following the exercices of thre Front End librairies certification on FreeCodeCamp, Here is the first exercice done with SASS

##Challenge to make : Create a random quote machine with a Json file...

function getQuotes() {
  return $.ajax({
    headers: {
      Accept: 'application/json'
    },
    url:
      'https://raw.githubusercontent.com/JackCree/random-quote-machine/main/quotes.json',
    success: function (jsonQuotes) {
      if (typeof jsonQuotes === 'string') {
        quotesData = JSON.parse(jsonQuotes);
        console.log('quotesData');
        console.log(quotesData);
      }
    }
  });
}

and HTML incrementation with Javascript

$('.quote-text').animate({ opacity: 0 }, 500, function () {
    $(this).animate({ opacity: 1 }, 500);
    $('#text').text(randomQuote.quote);
  });

  $('.quote-author').animate({ opacity: 0 }, 500, function () {
    $(this).animate({ opacity: 1 }, 500);
    $('#author').html(randomQuote.author);
  });

About

Create a a random quote machine with SASS, JQUERY and a database on JSON file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published