Created
March 27, 2010 15:24
-
-
Save ravicious/346150 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var myMooFlowPage = { | |
| start: function(){ | |
| var div = new Element('div').inject($('MooFlow'), 'top'); | |
| var mf = new MooFlow(div, { | |
| startIndex: 4, | |
| offsetY: 40, | |
| useCaption: true, | |
| useMouseWheel: true, | |
| useKeyInput: true, | |
| useViewer: true, | |
| bgColor: '#CEE2E3', | |
| onEmptyinit: function(){ | |
| this.loadJSON('photos/random.json'); | |
| }, | |
| //onClickView: function(obj){ | |
| onClickView: function(obj){ | |
| var a = new Element('a',{ | |
| 'class':'remooz-element', | |
| 'href':obj.href, | |
| 'title':obj.title + ' - '+ obj.alt, | |
| 'styles':{'border':'none'} | |
| }); | |
| var img = new Element('img',{ | |
| 'src':obj.src, | |
| 'title':obj.title, | |
| 'alt':obj.alt, | |
| 'styles':obj.coords | |
| }).setStyles({ | |
| 'position':'absolute', | |
| 'border':'none' | |
| }).inject(a); | |
| a.inject(document.body); | |
| var remooz = new ReMooz(a, { | |
| centered: true, | |
| resizeFactor: 0.8, | |
| origin: img, | |
| onCloseEnd: function(){ | |
| a.destroy(); | |
| delete remooz; | |
| } | |
| }).open(); | |
| } | |
| }); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment