public
Description: A checkbox edit in place metaphor for large sets of checkboxes to just display the selected options lables, then all options when user needs to edit in place.
Homepage: http://www.tjhanley.com/jquery-checkbox-edit/
Clone URL: git://github.com/tjhanley/jquery-checkbox-edit.git
jquery-checkbox-edit / index.html
100644 53 lines (49 sloc) 1.94 kb
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<html>
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  <title>jquery-checkbox-edit</title>
  
 
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<!-- include library -->
<script src="jquery-checkbox-edit.js" type="text/javascript"></script>
</head>
<style type="text/css" media="screen">
  /* style for done button */
  .jq-checkboxes-done {
    display:none;
    background-color:#ccc;
    text-align:center;
    border:1px solid #000;
  }
  body{
    font-family: 'Verdana';
    font-size:11px;
  }
  fieldset{
    background-color:navy;
  }
  legend{
    background-color:white;
  }
  .jq-checkboxes{
    background-color:white;
  }
</style>
 
 
<body id="index" onload="">
<fieldset>
  <legend>Choose your color choices [click inside div to edit]</legend>
 <div class="jq-checkboxes">
      <input type="checkbox" name="cb_name" value="1" id="opt1"><label for="opt1">Blue</label>
      <input type="checkbox" name="cb_name" value="2" id="opt2"><label for="opt2">Red</label>
      <input type="checkbox" checked="true" name="cb_name" value="3" id="opt3"><label for="opt3">Green</label>
      <input type="checkbox" name="cb_name" value="4" id="opt4"><label for="opt4">Yellow</label>
      <input type="checkbox" checked="true" name="cb_name" value="5" id="opt5"><label for="opt5">Purple</label>
      <br>
      <input type="checkbox" name="cb_name" value="10" id="opt10"><label for="opt10">Orange</label>
      <input type="checkbox" name="cb_name" value="20" id="opt20"><label for="opt20">Pink</label>
      <input type="checkbox" checked="true" name="cb_name" value="30" id="opt30"><label for="opt30">Brown</label>
      <input type="checkbox" name="cb_name" value="40" id="opt40"><label for="opt40">Black</label>
      <input type="checkbox" checked="true" name="cb_name" value="50" id="opt50"><label for="opt50">White</label>
 </div>
</fieldset>
</body>
</html>