简体   繁体   中英

Article gets loaded upon clicking on thumbnail without ajax

As shown in the demo(link below), when an article thumbnail was clicked, the full article appeared and the page did not refresh nor ajax was used.

Demo link:
http://tympanus.net/Development/AnimatedGridLayout/

Questions:

  1. By looking at the source code, the full article was actually loaded but hidden and was shown after I clicked on the thumbnail. How did she manage to assign this X thumbnail to X article? I couldn't find any references that link them up.
  2. I want to achieve such effect too, is there any easier way to do it?

Download source code link:
http://tympanus.net/codrops/2015/04/15/grid-item-animation-layout/

If i undesrtand correctly, for assigning X thumbnail to X article uses the position of the item in the array.

Easier would be using id for each thumbnail and directly reference the article.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM