mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
demos/index.html: added functionality to pull descriptions from individual html files.
This commit is contained in:
parent
31b8edcd4a
commit
5d1b0cb755
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user