Código Javascript:
Ver original
<!DOCTYPE html> <html> <head> <title>PhotoSwipe</title> <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <link href="styles.css" type="text/css" rel="stylesheet" /> <link href="photoswipe.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="klass.min.js"></script> <script type="text/javascript" src="code.photoswipe-3.0.5.min.js"></script> <script type="text/javascript"> (function(window, PhotoSwipe){ document.addEventListener('DOMContentLoaded', function(){ var options = { preventHide: true, getImageSource: function(obj){ return obj.url; }, getImageCaption: function(obj){ return obj.caption; } }, instance = PhotoSwipe.attach( [ { url: 'images/full/001.jpg', caption: 'Image 001'}, { url: 'images/full/002.jpg', caption: 'Image 002'}, { url: 'images/full/003.jpg', caption: 'Image 003'}, { url: 'images/full/004.jpg', caption: 'Image 004'}, { url: 'images/full/005.jpg', caption: 'Image 005'}, { url: 'images/full/006.jpg', caption: 'Image 006'}, { url: 'images/full/007.jpg', caption: 'Image 007'}, { url: 'images/full/008.jpg', caption: 'Image 008'}, { url: 'images/full/009.jpg', caption: 'Image 009'}, { url: 'images/full/010.jpg', caption: 'Image 010'}, { url: 'images/full/011.jpg', caption: 'Image 011'}, { url: 'images/full/012.jpg', caption: 'Image 012'}, { url: 'images/full/013.jpg', caption: 'Image 013'}, { url: 'images/full/014.jpg', caption: 'Image 014'}, { url: 'images/full/015.jpg', caption: 'Image 015'}, { url: 'images/full/016.jpg', caption: 'Image 016'} ], options ); instance.show(0); }, false); }(window, window.Code.PhotoSwipe)); </script> </head> <body> </body> </html>
la intencion es aprender como aplicar push a un arreglo multidimencional como este