MDL-46496 libraries: Add additional tests for jquery and jqueryUI

The additional tests add a clear example of the use of jquery UI images in
addition to working JavaScript.
This commit is contained in:
Andrew Nicols 2014-08-08 14:06:19 +08:00
parent 14cb870f46
commit c8f596147a

View File

@ -40,15 +40,33 @@ $PAGE->requires->jquery_plugin('migrate');
echo $OUTPUT->header();
// Note: the example was copied from http://jqueryui.com/accordion/ page.
// Note: the examples were copied from http://jqueryui.com/accordion/, and
// http://jqueryui.com/progressbar/#label.
?>
<script>
$(function() {
$( "#accordion" ).accordion();
$( "#progressbar" ).progressbar({
value: false
});
});
</script>
<style>
.ui-progressbar {
position: relative;
}
.progress-label {
position: absolute;
left: 50%;
top: 4px;
font-weight: bold;
text-shadow: 1px 1px 0 #fff;
}
</style>
<div id="progressbar"><div class="progress-label">Loading...</div></div>
<div id="accordion">
<h3>Section 1</h3>