Append loading Dynamic Carousel

Source: Internet
Author: User

I had a little trouble the other day, but soon it was settled. The reason to write it down is that as a front-end programmer, it is important to understand the order in which pages are loaded. Or you could write your own program unexpectedly. bug~~

Just started to write the use of append, using the Firebug of Firefox to view the element class inside the swiper-slide is still there, but the carousel does not have a dynamic effect. There are five carousel data in the database .....

The first load order must be understood:

Here is my JS code

1$(function(){2Showcarousel ();//Carousel Dynamic Data3 });4 /*** 5 * * * date:2017/01/096 * * * * Author:black_jay Astrid7 * * * Function: Carousel Dynamics (requires attention to load order)8 ***/9 functionShowcarousel () {Ten     //var str001 = ' ' One $.ajax ({ A URL: ", -Type: ' Post ', -DataType: ' JSON ', theSuccessfunction(data) { -              for(vari = 0; i < data.length; i + + ) { -                 varURL =Data[i]. URL; -                 varImage =Data[i]. Image; + Lunbo (url,image); -             } +             //$.parser.parse (str001); A             varMyswiper =NewSwiper (' #slide ',{ atPagination: '. Pagination ', -Slidesperview:1, -Paginationclickable:true, -Preloadimages:false, -Lazyloading:true, -autoplay:5000, inAutoplaydisableoninteraction:false, -Looptrue to             }); +         } -     }); the     functionLunbo (url,image) { *$ ("#showCarousel"). Append ("<div class= ' swiper-slide ' >" $+ "<a href=" "+url+" > "Panax Notoginseng+ " -+ "</a>" the+ "</div>"); +     } A}

Presumably this loading order can be solved.

The analysis of the loading order of the page, the future work encountered problems. In the discussion with everyone ... ~

Append loading Dynamic Carousel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.