案例:jQuery UI案例     状态:可编辑再运行    进入横版
AخA
 
1
<!doctype html>
2
<html lang="en">
3
<head>
4
  <meta charset="utf-8">
5
  <title>jQuery UI 选择(Selectable) - 序列化</title>
6
  <link rel="stylesheet" href="/css/jqu1.10.4/jquery-ui.min.css">
7
  <script src="/js/jqu/jquery.min1.10.2.js"></script>
8
  <script src="/js/jqu/jquery-ui.min1.10.4.js"></script>
9
  <link rel="stylesheet" href="jqueryui/style.css">
10
 
11
  <style>
12
  #feedback { font-size: 1.4em; }
13
  #selectable .ui-selecting { background: #FECA40; }
14
  #selectable .ui-selected { background: #F39814; color: white; }
15
  #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
16
  #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
17
  </style>
18
  <script>
19
  $(function() {
20
    $( "#selectable" ).selectable({
21
      stop: function() {
22
        var result = $( "#select-result" ).empty();
23
        $( ".ui-selected", this ).each(function() {
24
          var index = $( "#selectable li" ).index( this );

 运行结果 
 北美留学生论坛