]> source.dussan.org Git - jquery-ui.git/commitdiff
demos/index.html: added functionality to pull descriptions from individual html files.
authorCa-Phun Ung <pazu2k@gmail.com>
Tue, 30 Dec 2008 18:26:51 +0000 (18:26 +0000)
committerCa-Phun Ung <pazu2k@gmail.com>
Tue, 30 Dec 2008 18:26:51 +0000 (18:26 +0000)
demos/index.html

index 130b02f84b760c0a6cbb166fb0e108326516218f..775630bf4234e5edb4648e1a9f616a4d51b263ac 100644 (file)
                                                                $(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()