From e9a90ecb5da4c27243cd09c7b98a653e8c13f6e4 Mon Sep 17 00:00:00 2001 From: hugo cabrera diaz Date: Wed, 24 Oct 2018 10:21:42 -0500 Subject: [PATCH] ya logre traer las img solo falta agregar estilo --- modulos/slider/js/hugo.js | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/modulos/slider/js/hugo.js b/modulos/slider/js/hugo.js index 273a756..6c4f36d 100644 --- a/modulos/slider/js/hugo.js +++ b/modulos/slider/js/hugo.js @@ -7,6 +7,9 @@ let res=[ }, { id:3,nombre:'imagen07',url:'https://k31.kn3.net/D8E7CDD3E.jpg' + }, + { + id:4,nombre:'imagen08',url:'http://pre15.deviantart.net/c276/th/pre/i/2011/274/9/3/earth_and_moon_wallpaper_hd_by_loulines-d4bgsel.jpg' } ] for (var i = 0; i < res.length; i++) @@ -15,21 +18,25 @@ for (var i = 0; i < res.length; i++) console.log(res[i].id); inserta() } -function inserta() { +function inserta() +{ let app = document.getElementById('imgh'); - let img = document.createElement('img'); - let imgh = document.createElement('div'); - img.src = (res[i].url); - imgh.setAttribute('class', 'carrusel'); - img.setAttribute("width", "100%"); - img.setAttribute("height", "300px"); - app.appendChild(img); - app.appendChild(imgh); + let img = document.createElement('img'); + let imgh = document.createElement('div'); + img.src = (res[i].url); + img.setAttribute('class', 'carrusel'); + img.setAttribute("width", "100%"); + img.setAttribute("height", "300px!important"); + app.appendChild(img); + // app.appendChild(imgh); } $(document).ready(function(){ $('.carrusel').slick({ slidesToShow: 1, slidesToScroll: 1, + fade: true, + infinite: true, + cssEase: 'linear', autoplay: true, autoplaySpeed: 2000, dots: true,