A Simple Image gallery.
ExtJs can assist you to do some really cool things, here's one that really does have an immediate use as a mini gallery for a simple site. We are going to fetch some thumbnails from disc and then show a bigger version of that image inside a div with an animation effect.
However in a twist to the plot we are going to use AJAX to pull the images in and then offer the user an option to select a different album and load that in instead - again using ExtJs AJAX calls.
Worth a mention...
We have used a page specific CSS file for this example just in case you want to copy it, theres also a PHP script which does the server side stuff.
Please note that to save on a heap of GD learning - we used the excellent class.upload class by Colin Verot
We used...
- Ext.FX : Provides useful effects to build upon.
- scale -> Scales elements in specific directions with Easing as required
- Ext.Element : Provides methods/functions to retrive DOM/Page elements.
- get -> Pull an element from the DOM/page and work with it
- Ext.Data : Provides data services
- JsonStore -> Provides a store, reader and proxy to get Json Data from server side and work with it.
- Ext.Ajax : Provides a simple way to make Ajax Requests
- request -> Pull data from server side
- Ext.DomHelper : Dom functions
- append -> drop in elements after the last element inside a DOM element
- Ext.DataView : Provides an interface for the template class
- Ext.XTemplate : Provides methods to re-use data in conjunction with DataView
Try it out!
Albums:
