public
Description: Various bits and helpers for Prototype and scriptaculous, that might prove useful or not. :)
Homepage:
Clone URL: git://github.com/madrobby/prototype_helpers.git
100644 28 lines (26 sloc) 1.041 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>defaultValueActsAsHint functional test</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <script src="../lib/prototype/dist/prototype.js" type="text/javascript"></script>
  <script src="defaultvalueactsashint.js" type="text/javascript"></script>
  <style type="text/css" media="screen">
    .hint {
      color: #aaa;
      font-style: italic;
    }
  </style>
</head>
<body>
  <input type="text" id="foo" name="foo" value="Enter something!"/>
  <input type="text" id="bar" name="bar" value="Or something else!"/>
  <textarea id="baz" name="baz">Replace this text with something else</textarea>
  
  
  <script type="text/javascript" charset="utf-8">
    $('foo').defaultValueActsAsHint();
    $('bar').defaultValueActsAsHint();
    $('baz').defaultValueActsAsHint();
  </script>
</body>
</html>