This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | axios.put(this.apiBaseEndpoint + '/' + id, input) | |
| .then((response) => { | |
| // Success | |
| }) | |
| .catch((error) => { | |
| // Error | |
| if (error.response) { | |
| // The request was made and the server responded with a status code | |
| // that falls out of the range of 2xx | |
| // console.log(error.response.data); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/ | |
| // Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch | |
| // async function | |
| async function fetchAsync () { | |
| // await response of fetch call | |
| let response = await fetch('https://api.github.com'); | |
| // only proceed once promise is resolved | |
| let data = await response.json(); | |
| // only proceed once second promise is resolved | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | (function() { | |
| /* Define a variável que dá swipe no lightbox */ | |
| var magnificPopup = $.magnificPopup.instance; | |
| /* Carrega a função quando clica no lightbox (senão não pega a classe utilizada) */ | |
| $("a.image-lightbox").click(function(e) { | |
| /* Espera carregar o lightbox */ | |
| setTimeout(function() { | |
| /* Swipe para a esquerda - Próximo */ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //Аякс отправка форм | |
| //Документация: http://api.jquery.com/jquery.ajax/ | |
| $("#form, #form2").submit(function(e) { | |
| e.preventDefault; | |
| $.ajax({ | |
| type: "POST", | |
| url: "mail.php", | |
| data: $(this).serialize() | |
| }).done(function() { | |
| alert("Спасибо за заявку!"); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |