r1350 - trunk/demos

r1350 - trunk/demos


Author: pazu2k@gmail.com
Date: Tue Dec 30 10:26:51 2008
New Revision: 1350
Modified:
trunk/demos/index.html
Log:
demos/index.html: added functionality to pull descriptions from individual
html files.
Modified: trunk/demos/index.html
==============================================================================
--- trunk/demos/index.html    (original)
+++ trunk/demos/index.html    Tue Dec 30 10:26:51 2008
@@ -37,8 +37,21 @@
                                $(this).click(function() {
                                    $(this).parents('ul').find('li').removeClass('demo-config-on');
                                    $(this).parent().addClass('demo-config-on');
+                                    $('#demo-notes').hide();
+                                    $('#demo-frame').fadeOut();                                    
                                });
                            });
+                            
+                            $('#demo-frame').load(function(){
+                                var notes = $('.demo-description *', $(this).contents()[0]);
+                                if ($('#demo-notes').length == 0) {
+                                    $('<div id="demo-notes" />').insertAfter('#demo-config');                
+                                }
+                                $('#demo-notes').hide().empty().html(notes);
+                                $('#demo-frame').fadeIn({complete: function() {
+                                    $('#demo-notes').fadeIn();
+                                }});
+                            });                            
                        })
                    .end()
                .end()