Conversation
This reverts commit 1353d7f.
| @@ -0,0 +1,28 @@ | |||
| .x1{ | |||
There was a problem hiding this comment.
Estos estilos no los veo aplicados en ningún lado
There was a problem hiding this comment.
Estos nombres de clases son horripilantes xD
01-JS-DOM-APIs/index.html
Outdated
| <link rel="stylesheet" type="text/css" href="myStylesheet.css"> | ||
| </head> | ||
| <body> | ||
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> |
| <!--JAVASCRIPT --> | ||
| <!-- Function to change the text of a button when you drag the mouse over him --> | ||
| <script> | ||
| function changeText(id){ |
There was a problem hiding this comment.
Es solo un tema de nombre id es en realidad el elemento del DOM que representa el botton. Probablemente "target" o "element" serian nombre mas adecuados
01-JS-DOM-APIs/index.html
Outdated
| section.style.opacity = val; | ||
| requestAnimationFrame(fade); | ||
| } | ||
| })(); |
There was a problem hiding this comment.
La construcción de fade() es conocida como IIFE y sirve para llamar a una función inmediatamente luego de la definición.
http://benalman.com/news/2010/11/immediately-invoked-function-expression/
https://en.wikipedia.org/wiki/Immediately-invoked_function_expression
Dado que fade es llamada cuando se llama a fadeIn en la práctica es lo mismo usar una IIFE o poner el cuerpo de la misma dentro de fadeIn
| })(); | ||
| } | ||
|
|
||
| fadeIn(section); |
There was a problem hiding this comment.
Para fadeIn si podrías usar una construcción de IIFE ya que es la única llamada de la misma y sucede justo después de su definición
|
|
||
| <!-- Function to set specific content to the section when is clicked. Exercise 6--> | ||
| <script> | ||
| function loadXMLDoc() { |
There was a problem hiding this comment.
No encuentro donde estas invocando esta funcion
|
Respondi por skype pero no se si lo viste seba. Las funciones las llamo
cuando hice el ejercicio. Despues, cuando pase al siguiente. No hice un
boton por cada ejercicoo. A medida que iban funcionando le pasaba otro
nombre de funcion.
Lo del fadein lo tengo que cambiar? O es mas una mejor forma de hacerlo?
El 27/04/2017 15:28, "Sebastián de la Fuente" <notifications@github.com>
escribió:
… ***@***.**** commented on this pull request.
------------------------------
In 01-JS-DOM-APIs/css/estilosX.css
<#2 (comment)>
:
> @@ -0,0 +1,28 @@
+.x1{
Estos estilos no los veo aplicados en ningún lado
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> @@ -0,0 +1,211 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ <title>Topic 1</title>
+
+ <link rel="stylesheet" type="text/css" href="myStylesheet.css">
+</head>
+<body>
+<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
Angular? estimo que esto esta de más
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> + </button>
+ <input type="text" name="inputSearch" id="searchField">
+ </div>
+ <br>
+ <div>
+ <button onclick="tableCreator()" id="tableMaker">Make a table</button>
+ <table id="table">
+
+ </table>
+ </div>
+
+
+<!--JAVASCRIPT -->
+<!-- Function to change the text of a button when you drag the mouse over him -->
+<script>
+ function changeText(id){
Es solo un tema de nombre id es en realidad el elemento del DOM que
representa el botton. Probablemente "target" o "element" serian nombre mas
adecuados
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> +</script>
+<!-- fade in / Exercise 3-->
+<script>
+ let section = document.querySelector('.js-fade');
+
+ function fadeIn(section, display){
+ section.style.opacity = -10; //time after page loads to display the content
+ section.style.display = display || "block";
+
+ (function fade() {
+ let val = parseFloat(section.style.opacity);
+ if (!((val += .1) > 1)) {
+ section.style.opacity = val;
+ requestAnimationFrame(fade);
+ }
+ })();
La construcción de fade() es conocida como IIFE y sirve para llamar a una
función inmediatamente luego de la definición.
http://benalman.com/news/2010/11/immediately-invoked-function-expression/
https://en.wikipedia.org/wiki/Immediately-invoked_function_expression
Dado que fade es llamada cuando se llama a fadeIn en la práctica es lo
mismo usar una IIFE o poner el cuerpo de la misma dentro de fadeIn
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> + let section = document.querySelector('.js-fade');
+
+ function fadeIn(section, display){
+ section.style.opacity = -10; //time after page loads to display the content
+ section.style.display = display || "block";
+
+ (function fade() {
+ let val = parseFloat(section.style.opacity);
+ if (!((val += .1) > 1)) {
+ section.style.opacity = val;
+ requestAnimationFrame(fade);
+ }
+ })();
+ }
+
+ fadeIn(section);
Para *fadeIn* si podrías usar una construcción de IIFE ya que es la única
llamada de la misma y sucede justo después de su definición
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> +
+ (function fade() {
+ let val = parseFloat(section.style.opacity);
+ if (!((val += .1) > 1)) {
+ section.style.opacity = val;
+ requestAnimationFrame(fade);
+ }
+ })();
+ }
+
+ fadeIn(section);
+</script>
+
+<!-- Function to set specific content to the section when is clicked. Exercise 6-->
+ <script>
+ function loadXMLDoc() {
No encuentro donde estas invocando esta funcion
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AabCd8-w1ojnKPDsD4DRB_zPIElK2PQ2ks5r0N5DgaJpZM4NJO8A>
.
|
|
Como serian nombres no horripilantes javi? jajaja
El 27/04/2017 15:28, "Sebastián de la Fuente" <notifications@github.com>
escribió:
… ***@***.**** commented on this pull request.
------------------------------
In 01-JS-DOM-APIs/css/estilosX.css
<#2 (comment)>
:
> @@ -0,0 +1,28 @@
+.x1{
Estos estilos no los veo aplicados en ningún lado
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> @@ -0,0 +1,211 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ <title>Topic 1</title>
+
+ <link rel="stylesheet" type="text/css" href="myStylesheet.css">
+</head>
+<body>
+<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
Angular? estimo que esto esta de más
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> + </button>
+ <input type="text" name="inputSearch" id="searchField">
+ </div>
+ <br>
+ <div>
+ <button onclick="tableCreator()" id="tableMaker">Make a table</button>
+ <table id="table">
+
+ </table>
+ </div>
+
+
+<!--JAVASCRIPT -->
+<!-- Function to change the text of a button when you drag the mouse over him -->
+<script>
+ function changeText(id){
Es solo un tema de nombre id es en realidad el elemento del DOM que
representa el botton. Probablemente "target" o "element" serian nombre mas
adecuados
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> +</script>
+<!-- fade in / Exercise 3-->
+<script>
+ let section = document.querySelector('.js-fade');
+
+ function fadeIn(section, display){
+ section.style.opacity = -10; //time after page loads to display the content
+ section.style.display = display || "block";
+
+ (function fade() {
+ let val = parseFloat(section.style.opacity);
+ if (!((val += .1) > 1)) {
+ section.style.opacity = val;
+ requestAnimationFrame(fade);
+ }
+ })();
La construcción de fade() es conocida como IIFE y sirve para llamar a una
función inmediatamente luego de la definición.
http://benalman.com/news/2010/11/immediately-invoked-function-expression/
https://en.wikipedia.org/wiki/Immediately-invoked_function_expression
Dado que fade es llamada cuando se llama a fadeIn en la práctica es lo
mismo usar una IIFE o poner el cuerpo de la misma dentro de fadeIn
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> + let section = document.querySelector('.js-fade');
+
+ function fadeIn(section, display){
+ section.style.opacity = -10; //time after page loads to display the content
+ section.style.display = display || "block";
+
+ (function fade() {
+ let val = parseFloat(section.style.opacity);
+ if (!((val += .1) > 1)) {
+ section.style.opacity = val;
+ requestAnimationFrame(fade);
+ }
+ })();
+ }
+
+ fadeIn(section);
Para *fadeIn* si podrías usar una construcción de IIFE ya que es la única
llamada de la misma y sucede justo después de su definición
------------------------------
In 01-JS-DOM-APIs/index.html
<#2 (comment)>
:
> +
+ (function fade() {
+ let val = parseFloat(section.style.opacity);
+ if (!((val += .1) > 1)) {
+ section.style.opacity = val;
+ requestAnimationFrame(fade);
+ }
+ })();
+ }
+
+ fadeIn(section);
+</script>
+
+<!-- Function to set specific content to the section when is clicked. Exercise 6-->
+ <script>
+ function loadXMLDoc() {
No encuentro donde estas invocando esta funcion
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AabCd8-w1ojnKPDsD4DRB_zPIElK2PQ2ks5r0N5DgaJpZM4NJO8A>
.
|
| section.style.opacity = -10; //time after page loads to display the content | ||
| section.style.display = display || "block"; | ||
| (function fade() { |
There was a problem hiding this comment.
La idea acá es no hacer la animación a mano si no usar javascript para registrar un handler, eventos del browser para saber cuándo cargó y CSS3 para la transición
| }; | ||
| eventRequestReusable(config).then(resolve,reject); //Here is where the configuration object is entered | ||
| function resolve(xhttp) { | ||
| let response = JSON.parse(event.target.response); |
There was a problem hiding this comment.
de dónde sale event?? funciona, pero no veo por qué
No description provided.