1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | // The accordian relies on the UL, LI, and A tags to properly configure itself <ul id="accordianExample" class="ui-accordian-container" style="width:400px;"> <li> <a href="#">Title 1</a> <div>Your text would go here</div> </li> <li> <a href="#">Title 2</a> <div>More text</div> </li> </ul> // yes, it's this simple $("#accordianExample").accordian(); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <div id="sliderExample" class="ui-slider-1"> <div class="ui-slider-handle"></div> </div> // this will set up the slider $("#sliderExample").slider(); // this will set the maximum and minimum values of the slider $("#sliderExample").slider({ min: 10, max: 20 }); // this will get the value of the slider $("#sliderExample").slider("value"); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <input type=text id=dateField> // this will create a date picker, which pops up when the textfield gets focus $("#dateField").datepicker(); // show the drop-down fields to let the user jump around months and years $("#dateField").datepicker({ changeMonth: true, changeYear: true }); // show two months instead of one $("#dateField").datepicker({ numberOfMonths: 2 }); // because this widget has to support internationalization, it has a TON of // functions that let you set every aspect of the calendar, to support any // possible calendar settings. (Although it doesn't look like the jQuery team // felt it was necessary to support the Mayan calendar. Guess 2012 is right // around the corner.) // // This function lets you set the date format that will appear in the textfield. $("#dateField").datepicker({ dateFormat: 'dd/mm/yyyy' }); // Gets the date back from the datepicker var date = $("#dateField").datepicker("getDate"); |
1 2 3 4 5 6 7 8 9 10 | <div id="progressbarExample"></div> // make this div a progress bar $("#progressbarExample").progressbar(); // start the progress bar $("#progressbarExample").start(); // stop the progress bar $("#progressbarExample").stop(); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <div id="dialogExample" title="Example Dialog">Text here. Warning!!</div> // turn the DIV into a dialog $("#dialogExample").dialog(); // open the dialog, then close the dialog $("#dialogExample").dialog("open").dialog("close"); // make a dialog that the user can't drag around, is modal, and in the center of the page $("#dialogExample").dialog({ draggable: false, modal: true, position: "center" }); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |