


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <link rel="icon" type="image/vnd.microsoft.icon" href="http://www.gstatic.com/codesite/ph/images/phosting.ico">
 
 <script type="text/javascript">
 
 
 
 var codesite_token = null;
 
 
 var logged_in_user_email = null;
 
 
 var relative_base_url = "";
 
 </script>
 
 
 <title>jVal.js - 
 jquery-jval -
 
 Project Hosting on Google Code</title>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
 
 <meta name="ROBOTS" content="NOARCHIVE">
 
 <link type="text/css" rel="stylesheet" href="http://www.gstatic.com/codesite/ph/12904809565893879022/css/ph_core.css">
 
 <link type="text/css" rel="stylesheet" href="http://www.gstatic.com/codesite/ph/12904809565893879022/css/ph_detail.css" >
 
 
 <link type="text/css" rel="stylesheet" href="http://www.gstatic.com/codesite/ph/12904809565893879022/css/d_sb_20080522.css" >
 
 
 
<!--[if IE]>
 <link type="text/css" rel="stylesheet" href="http://www.gstatic.com/codesite/ph/12904809565893879022/css/d_ie.css" >
<![endif]-->
 <style type="text/css">
 .menuIcon.off { background: no-repeat url(http://www.gstatic.com/codesite/ph/images/dropdown_sprite.gif) 0 -42px }
 .menuIcon.on { background: no-repeat url(http://www.gstatic.com/codesite/ph/images/dropdown_sprite.gif) 0 -28px }
 .menuIcon.down { background: no-repeat url(http://www.gstatic.com/codesite/ph/images/dropdown_sprite.gif) 0 0; }
 </style>
</head>
<body class="t4">
 <script type="text/javascript">
 var _gaq = _gaq || [];
 _gaq.push(
 ['siteTracker._setAccount', 'UA-18071-1'],
 ['siteTracker._trackPageview']);
 
 _gaq.push(
 ['projectTracker._setAccount', 'UA-87585-7'],
 ['projectTracker._trackPageview']);
 
 (function() {
 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
 })();
 </script>
 <div id="gaia">
 
 <span>
 
 <a href="#" id="projects-dropdown" onclick="return false;"><u>My favorites</u> <small>&#9660;</small></a>
 | <a href="https://www.google.com/accounts/ServiceLogin?service=code&amp;ltmpl=phosting&amp;continue=http%3A%2F%2Fcode.google.com%2Fp%2Fjquery-jval%2Fsource%2Fbrowse%2Ftrunk%2FjVal.js&amp;followup=http%3A%2F%2Fcode.google.com%2Fp%2Fjquery-jval%2Fsource%2Fbrowse%2Ftrunk%2FjVal.js" onclick="_CS_click('/gb/ph/signin');"><u>Sign in</u></a>
 
 </span>

 </div>
 <div class="gbh" style="left: 0pt;"></div>
 <div class="gbh" style="right: 0pt;"></div>
 
 
 <div style="height: 1px"></div>
<!--[if IE 6]>
<div style="text-align:center;">
Support browsers that contribute to open source, try <a href="http://www.firefox.com">Firefox</a> or <a href="http://www.google.com/chrome">Google Chrome</a>.
</div>
<![endif]-->




 <table style="padding:0px; margin: 20px 0px 0px 0px; width:100%" cellpadding="0" cellspacing="0">
 <tr style="height: 58px;">
 
 <td style="width: 55px; text-align:center;">
 <a href="/p/jquery-jval/">
 
 <img src="http://www.gstatic.com/codesite/ph/images/defaultlogo.png" alt="Logo">
 
 </a>
 </td>
 
 <td style="padding-left: 0.5em">
 
 <div id="pname" style="margin: 0px 0px -3px 0px">
 <a href="/p/jquery-jval/" style="text-decoration:none; color:#000">jquery-jval</a>
 
 </div>
 <div id="psum">
 <i><a id="project_summary_link" href="/p/jquery-jval/" style="text-decoration:none; color:#000">jquery-jval - attractive form field validation plugin with keypress validation</a></i>
 </div>
 
 </td>
 <td style="white-space:nowrap;text-align:right">
 
 <form action="/hosting/search">
 <input size="30" name="q" value="">
 <input type="submit" name="projectsearch" value="Search projects" >
 </form>
 
 </tr>
 </table>


 
<table id="mt" cellspacing="0" cellpadding="0" width="100%" border="0">
 <tr>
 <th onclick="if (!cancelBubble) _go('/p/jquery-jval/');">
 <div class="tab inactive">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/jquery-jval/">Project&nbsp;Home</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 
 
 <th onclick="if (!cancelBubble) _go('/p/jquery-jval/downloads/list');">
 <div class="tab inactive">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/jquery-jval/downloads/list">Downloads</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 
 
 
 <th onclick="if (!cancelBubble) _go('/p/jquery-jval/w/list');">
 <div class="tab inactive">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/jquery-jval/w/list">Wiki</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 
 
 
 <th onclick="if (!cancelBubble) _go('/p/jquery-jval/issues/list');">
 <div class="tab inactive">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/jquery-jval/issues/list">Issues</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 
 
 
 <th onclick="if (!cancelBubble) _go('/p/jquery-jval/source/checkout');">
 <div class="tab active">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/jquery-jval/source/checkout">Source</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 <td width="100%">&nbsp;</td>
 </tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0" class="st">
 <tr>
 
 
 
 
 
 
 <td>
 <div class="st2">
 <div class="isf">
 
 
 
 <span class="inst1"><a href="/p/jquery-jval/source/checkout">Checkout</a></span> |
 <span class="inst2"><a href="/p/jquery-jval/source/browse/">Browse</a></span> |
 <span class="inst3"><a href="/p/jquery-jval/source/list">Changes</a></span> |
 
 <form action="http://www.google.com/codesearch" method="get" style="display:inline"
 onsubmit="document.getElementById('codesearchq').value = document.getElementById('origq').value + ' package:http://jquery-jval\\.googlecode\\.com'">
 <input type="hidden" name="q" id="codesearchq" value="">
 <input maxlength="2048" size="38" id="origq" name="origq" value="" title="Google Code Search" style="font-size:92%">&nbsp;<input type="submit" value="Search Trunk" name="btnG" style="font-size:92%">
 
 
 
 </form>
 </div>
</div>

 </td>
 
 
 
 <td height="4" align="right" valign="top" class="bevel-right">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 </td>
 </tr>
</table>
<script type="text/javascript">
 var cancelBubble = false;
 function _go(url) { document.location = url; }
</script>


<div id="maincol"
 
>

 
<!-- IE -->




<div class="expand">


<style type="text/css">
 #file_flipper { display: inline; float: right; white-space: nowrap; }
 #file_flipper.hidden { display: none; }
 #file_flipper .pagelink { color: #0000CC; text-decoration: underline; }
 #file_flipper #visiblefiles { padding-left: 0.5em; padding-right: 0.5em; }
</style>
<div id="nav_and_rev" class="heading">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner" id="bub">
 <div class="bub-top">
 <div class="pagination" style="margin-left: 2em">
 <table cellpadding="0" cellspacing="0" class="flipper">
 <tbody>
 <tr>
 
 <td>
 <ul class="leftside">
 
 <li><a href="/p/jquery-jval/source/browse/trunk/jVal.js?r=26" title="Previous">&lsaquo;r26</a></li>
 
 </ul>
 </td>
 
 <td><b>r27</b></td>
 
 </tr>
 </tbody>
 </table>
 </div>
 
 <div class="" style="vertical-align: top">
 <div class="src_crumbs src_nav">
 <strong class="src_nav">Source path:&nbsp;</strong>
 <span id="crumb_root">
 
 <a href="/p/jquery-jval/source/browse/">svn</a>/&nbsp;</span>
 <span id="crumb_links" class="ifClosed"><a href="/p/jquery-jval/source/browse/trunk/">trunk</a><span class="sp">/&nbsp;</span>jVal.js</span>
 
 
 </div>
 
 </div>
 <div style="clear:both"></div>
 </div>
 </div>
</div>

<style type="text/css">
 
  tr.inline_comment {
 background: #fff;
 vertical-align: top;
 }
 div.draft, div.published {
 padding: .3em;
 border: 1px solid #999; 
 margin-bottom: .1em;
 font-family: arial, sans-serif;
 max-width: 60em;
 }
 div.draft {
 background: #ffa;
 } 
 div.published {
 background: #e5ecf9;
 }
 div.published .body, div.draft .body {
 padding: .5em .1em .1em .1em;
 max-width: 60em;
 white-space: pre-wrap;
 white-space: -moz-pre-wrap;
 white-space: -pre-wrap;
 white-space: -o-pre-wrap;
 word-wrap: break-word;
 }
 div.draft .actions {
 margin-left: 1em;
 font-size: 90%;
 }
 div.draft form {
 padding: .5em .5em .5em 0;
 }
 div.draft textarea, div.published textarea {
 width: 95%;
 height: 10em;
 font-family: arial, sans-serif;
 margin-bottom: .5em;
 }


 
 .nocursor, .nocursor td, .cursor_hidden, .cursor_hidden td {
 background-color: white;
 height: 2px;
 }
 .cursor, .cursor td {
 background-color: darkblue;
 height: 2px;
 display: '';
 }

</style>
<div class="fc">
 
 
 
<style type="text/css">
.undermouse span {
 background-image: url(http://www.gstatic.com/codesite/ph/images/comments.gif); }
</style>
<table class="opened" id="review_comment_area"
><tr>
<td id="nums">
<pre><table width="100%"><tr class="nocursor"><td></td></tr></table></pre>
<pre><table width="100%" id="nums_table_0"><tr id="gr_svn27_1"

><td id="1"><a href="#1">1</a></td></tr
><tr id="gr_svn27_2"

><td id="2"><a href="#2">2</a></td></tr
><tr id="gr_svn27_3"

><td id="3"><a href="#3">3</a></td></tr
><tr id="gr_svn27_4"

><td id="4"><a href="#4">4</a></td></tr
><tr id="gr_svn27_5"

><td id="5"><a href="#5">5</a></td></tr
><tr id="gr_svn27_6"

><td id="6"><a href="#6">6</a></td></tr
><tr id="gr_svn27_7"

><td id="7"><a href="#7">7</a></td></tr
><tr id="gr_svn27_8"

><td id="8"><a href="#8">8</a></td></tr
><tr id="gr_svn27_9"

><td id="9"><a href="#9">9</a></td></tr
><tr id="gr_svn27_10"

><td id="10"><a href="#10">10</a></td></tr
><tr id="gr_svn27_11"

><td id="11"><a href="#11">11</a></td></tr
><tr id="gr_svn27_12"

><td id="12"><a href="#12">12</a></td></tr
><tr id="gr_svn27_13"

><td id="13"><a href="#13">13</a></td></tr
><tr id="gr_svn27_14"

><td id="14"><a href="#14">14</a></td></tr
><tr id="gr_svn27_15"

><td id="15"><a href="#15">15</a></td></tr
><tr id="gr_svn27_16"

><td id="16"><a href="#16">16</a></td></tr
><tr id="gr_svn27_17"

><td id="17"><a href="#17">17</a></td></tr
><tr id="gr_svn27_18"

><td id="18"><a href="#18">18</a></td></tr
><tr id="gr_svn27_19"

><td id="19"><a href="#19">19</a></td></tr
><tr id="gr_svn27_20"

><td id="20"><a href="#20">20</a></td></tr
><tr id="gr_svn27_21"

><td id="21"><a href="#21">21</a></td></tr
><tr id="gr_svn27_22"

><td id="22"><a href="#22">22</a></td></tr
><tr id="gr_svn27_23"

><td id="23"><a href="#23">23</a></td></tr
><tr id="gr_svn27_24"

><td id="24"><a href="#24">24</a></td></tr
><tr id="gr_svn27_25"

><td id="25"><a href="#25">25</a></td></tr
><tr id="gr_svn27_26"

><td id="26"><a href="#26">26</a></td></tr
><tr id="gr_svn27_27"

><td id="27"><a href="#27">27</a></td></tr
><tr id="gr_svn27_28"

><td id="28"><a href="#28">28</a></td></tr
><tr id="gr_svn27_29"

><td id="29"><a href="#29">29</a></td></tr
><tr id="gr_svn27_30"

><td id="30"><a href="#30">30</a></td></tr
><tr id="gr_svn27_31"

><td id="31"><a href="#31">31</a></td></tr
><tr id="gr_svn27_32"

><td id="32"><a href="#32">32</a></td></tr
><tr id="gr_svn27_33"

><td id="33"><a href="#33">33</a></td></tr
><tr id="gr_svn27_34"

><td id="34"><a href="#34">34</a></td></tr
><tr id="gr_svn27_35"

><td id="35"><a href="#35">35</a></td></tr
><tr id="gr_svn27_36"

><td id="36"><a href="#36">36</a></td></tr
><tr id="gr_svn27_37"

><td id="37"><a href="#37">37</a></td></tr
><tr id="gr_svn27_38"

><td id="38"><a href="#38">38</a></td></tr
><tr id="gr_svn27_39"

><td id="39"><a href="#39">39</a></td></tr
><tr id="gr_svn27_40"

><td id="40"><a href="#40">40</a></td></tr
><tr id="gr_svn27_41"

><td id="41"><a href="#41">41</a></td></tr
><tr id="gr_svn27_42"

><td id="42"><a href="#42">42</a></td></tr
><tr id="gr_svn27_43"

><td id="43"><a href="#43">43</a></td></tr
><tr id="gr_svn27_44"

><td id="44"><a href="#44">44</a></td></tr
><tr id="gr_svn27_45"

><td id="45"><a href="#45">45</a></td></tr
><tr id="gr_svn27_46"

><td id="46"><a href="#46">46</a></td></tr
><tr id="gr_svn27_47"

><td id="47"><a href="#47">47</a></td></tr
><tr id="gr_svn27_48"

><td id="48"><a href="#48">48</a></td></tr
><tr id="gr_svn27_49"

><td id="49"><a href="#49">49</a></td></tr
><tr id="gr_svn27_50"

><td id="50"><a href="#50">50</a></td></tr
><tr id="gr_svn27_51"

><td id="51"><a href="#51">51</a></td></tr
><tr id="gr_svn27_52"

><td id="52"><a href="#52">52</a></td></tr
><tr id="gr_svn27_53"

><td id="53"><a href="#53">53</a></td></tr
><tr id="gr_svn27_54"

><td id="54"><a href="#54">54</a></td></tr
><tr id="gr_svn27_55"

><td id="55"><a href="#55">55</a></td></tr
><tr id="gr_svn27_56"

><td id="56"><a href="#56">56</a></td></tr
><tr id="gr_svn27_57"

><td id="57"><a href="#57">57</a></td></tr
><tr id="gr_svn27_58"

><td id="58"><a href="#58">58</a></td></tr
><tr id="gr_svn27_59"

><td id="59"><a href="#59">59</a></td></tr
><tr id="gr_svn27_60"

><td id="60"><a href="#60">60</a></td></tr
><tr id="gr_svn27_61"

><td id="61"><a href="#61">61</a></td></tr
><tr id="gr_svn27_62"

><td id="62"><a href="#62">62</a></td></tr
><tr id="gr_svn27_63"

><td id="63"><a href="#63">63</a></td></tr
><tr id="gr_svn27_64"

><td id="64"><a href="#64">64</a></td></tr
><tr id="gr_svn27_65"

><td id="65"><a href="#65">65</a></td></tr
><tr id="gr_svn27_66"

><td id="66"><a href="#66">66</a></td></tr
><tr id="gr_svn27_67"

><td id="67"><a href="#67">67</a></td></tr
><tr id="gr_svn27_68"

><td id="68"><a href="#68">68</a></td></tr
><tr id="gr_svn27_69"

><td id="69"><a href="#69">69</a></td></tr
><tr id="gr_svn27_70"

><td id="70"><a href="#70">70</a></td></tr
><tr id="gr_svn27_71"

><td id="71"><a href="#71">71</a></td></tr
><tr id="gr_svn27_72"

><td id="72"><a href="#72">72</a></td></tr
><tr id="gr_svn27_73"

><td id="73"><a href="#73">73</a></td></tr
><tr id="gr_svn27_74"

><td id="74"><a href="#74">74</a></td></tr
><tr id="gr_svn27_75"

><td id="75"><a href="#75">75</a></td></tr
><tr id="gr_svn27_76"

><td id="76"><a href="#76">76</a></td></tr
><tr id="gr_svn27_77"

><td id="77"><a href="#77">77</a></td></tr
><tr id="gr_svn27_78"

><td id="78"><a href="#78">78</a></td></tr
><tr id="gr_svn27_79"

><td id="79"><a href="#79">79</a></td></tr
><tr id="gr_svn27_80"

><td id="80"><a href="#80">80</a></td></tr
><tr id="gr_svn27_81"

><td id="81"><a href="#81">81</a></td></tr
><tr id="gr_svn27_82"

><td id="82"><a href="#82">82</a></td></tr
><tr id="gr_svn27_83"

><td id="83"><a href="#83">83</a></td></tr
><tr id="gr_svn27_84"

><td id="84"><a href="#84">84</a></td></tr
><tr id="gr_svn27_85"

><td id="85"><a href="#85">85</a></td></tr
><tr id="gr_svn27_86"

><td id="86"><a href="#86">86</a></td></tr
><tr id="gr_svn27_87"

><td id="87"><a href="#87">87</a></td></tr
><tr id="gr_svn27_88"

><td id="88"><a href="#88">88</a></td></tr
><tr id="gr_svn27_89"

><td id="89"><a href="#89">89</a></td></tr
><tr id="gr_svn27_90"

><td id="90"><a href="#90">90</a></td></tr
><tr id="gr_svn27_91"

><td id="91"><a href="#91">91</a></td></tr
><tr id="gr_svn27_92"

><td id="92"><a href="#92">92</a></td></tr
><tr id="gr_svn27_93"

><td id="93"><a href="#93">93</a></td></tr
><tr id="gr_svn27_94"

><td id="94"><a href="#94">94</a></td></tr
><tr id="gr_svn27_95"

><td id="95"><a href="#95">95</a></td></tr
><tr id="gr_svn27_96"

><td id="96"><a href="#96">96</a></td></tr
><tr id="gr_svn27_97"

><td id="97"><a href="#97">97</a></td></tr
><tr id="gr_svn27_98"

><td id="98"><a href="#98">98</a></td></tr
><tr id="gr_svn27_99"

><td id="99"><a href="#99">99</a></td></tr
><tr id="gr_svn27_100"

><td id="100"><a href="#100">100</a></td></tr
><tr id="gr_svn27_101"

><td id="101"><a href="#101">101</a></td></tr
><tr id="gr_svn27_102"

><td id="102"><a href="#102">102</a></td></tr
><tr id="gr_svn27_103"

><td id="103"><a href="#103">103</a></td></tr
><tr id="gr_svn27_104"

><td id="104"><a href="#104">104</a></td></tr
><tr id="gr_svn27_105"

><td id="105"><a href="#105">105</a></td></tr
><tr id="gr_svn27_106"

><td id="106"><a href="#106">106</a></td></tr
><tr id="gr_svn27_107"

><td id="107"><a href="#107">107</a></td></tr
><tr id="gr_svn27_108"

><td id="108"><a href="#108">108</a></td></tr
><tr id="gr_svn27_109"

><td id="109"><a href="#109">109</a></td></tr
><tr id="gr_svn27_110"

><td id="110"><a href="#110">110</a></td></tr
><tr id="gr_svn27_111"

><td id="111"><a href="#111">111</a></td></tr
><tr id="gr_svn27_112"

><td id="112"><a href="#112">112</a></td></tr
><tr id="gr_svn27_113"

><td id="113"><a href="#113">113</a></td></tr
><tr id="gr_svn27_114"

><td id="114"><a href="#114">114</a></td></tr
><tr id="gr_svn27_115"

><td id="115"><a href="#115">115</a></td></tr
><tr id="gr_svn27_116"

><td id="116"><a href="#116">116</a></td></tr
><tr id="gr_svn27_117"

><td id="117"><a href="#117">117</a></td></tr
><tr id="gr_svn27_118"

><td id="118"><a href="#118">118</a></td></tr
><tr id="gr_svn27_119"

><td id="119"><a href="#119">119</a></td></tr
><tr id="gr_svn27_120"

><td id="120"><a href="#120">120</a></td></tr
><tr id="gr_svn27_121"

><td id="121"><a href="#121">121</a></td></tr
><tr id="gr_svn27_122"

><td id="122"><a href="#122">122</a></td></tr
><tr id="gr_svn27_123"

><td id="123"><a href="#123">123</a></td></tr
><tr id="gr_svn27_124"

><td id="124"><a href="#124">124</a></td></tr
><tr id="gr_svn27_125"

><td id="125"><a href="#125">125</a></td></tr
><tr id="gr_svn27_126"

><td id="126"><a href="#126">126</a></td></tr
><tr id="gr_svn27_127"

><td id="127"><a href="#127">127</a></td></tr
><tr id="gr_svn27_128"

><td id="128"><a href="#128">128</a></td></tr
><tr id="gr_svn27_129"

><td id="129"><a href="#129">129</a></td></tr
><tr id="gr_svn27_130"

><td id="130"><a href="#130">130</a></td></tr
><tr id="gr_svn27_131"

><td id="131"><a href="#131">131</a></td></tr
><tr id="gr_svn27_132"

><td id="132"><a href="#132">132</a></td></tr
><tr id="gr_svn27_133"

><td id="133"><a href="#133">133</a></td></tr
><tr id="gr_svn27_134"

><td id="134"><a href="#134">134</a></td></tr
><tr id="gr_svn27_135"

><td id="135"><a href="#135">135</a></td></tr
><tr id="gr_svn27_136"

><td id="136"><a href="#136">136</a></td></tr
><tr id="gr_svn27_137"

><td id="137"><a href="#137">137</a></td></tr
><tr id="gr_svn27_138"

><td id="138"><a href="#138">138</a></td></tr
><tr id="gr_svn27_139"

><td id="139"><a href="#139">139</a></td></tr
><tr id="gr_svn27_140"

><td id="140"><a href="#140">140</a></td></tr
><tr id="gr_svn27_141"

><td id="141"><a href="#141">141</a></td></tr
><tr id="gr_svn27_142"

><td id="142"><a href="#142">142</a></td></tr
><tr id="gr_svn27_143"

><td id="143"><a href="#143">143</a></td></tr
><tr id="gr_svn27_144"

><td id="144"><a href="#144">144</a></td></tr
><tr id="gr_svn27_145"

><td id="145"><a href="#145">145</a></td></tr
><tr id="gr_svn27_146"

><td id="146"><a href="#146">146</a></td></tr
><tr id="gr_svn27_147"

><td id="147"><a href="#147">147</a></td></tr
><tr id="gr_svn27_148"

><td id="148"><a href="#148">148</a></td></tr
><tr id="gr_svn27_149"

><td id="149"><a href="#149">149</a></td></tr
><tr id="gr_svn27_150"

><td id="150"><a href="#150">150</a></td></tr
><tr id="gr_svn27_151"

><td id="151"><a href="#151">151</a></td></tr
><tr id="gr_svn27_152"

><td id="152"><a href="#152">152</a></td></tr
><tr id="gr_svn27_153"

><td id="153"><a href="#153">153</a></td></tr
><tr id="gr_svn27_154"

><td id="154"><a href="#154">154</a></td></tr
><tr id="gr_svn27_155"

><td id="155"><a href="#155">155</a></td></tr
><tr id="gr_svn27_156"

><td id="156"><a href="#156">156</a></td></tr
><tr id="gr_svn27_157"

><td id="157"><a href="#157">157</a></td></tr
><tr id="gr_svn27_158"

><td id="158"><a href="#158">158</a></td></tr
><tr id="gr_svn27_159"

><td id="159"><a href="#159">159</a></td></tr
><tr id="gr_svn27_160"

><td id="160"><a href="#160">160</a></td></tr
><tr id="gr_svn27_161"

><td id="161"><a href="#161">161</a></td></tr
><tr id="gr_svn27_162"

><td id="162"><a href="#162">162</a></td></tr
><tr id="gr_svn27_163"

><td id="163"><a href="#163">163</a></td></tr
><tr id="gr_svn27_164"

><td id="164"><a href="#164">164</a></td></tr
><tr id="gr_svn27_165"

><td id="165"><a href="#165">165</a></td></tr
><tr id="gr_svn27_166"

><td id="166"><a href="#166">166</a></td></tr
><tr id="gr_svn27_167"

><td id="167"><a href="#167">167</a></td></tr
><tr id="gr_svn27_168"

><td id="168"><a href="#168">168</a></td></tr
><tr id="gr_svn27_169"

><td id="169"><a href="#169">169</a></td></tr
><tr id="gr_svn27_170"

><td id="170"><a href="#170">170</a></td></tr
></table></pre>
<pre><table width="100%"><tr class="nocursor"><td></td></tr></table></pre>
</td>
<td id="lines">
<pre class="prettyprint"><table width="100%"><tr class="cursor_stop cursor_hidden"><td></td></tr></table></pre>
<pre class="prettyprint lang-js"><table id="src_table_0"><tr
id=sl_svn27_1

><td class="source">/*<br></td></tr
><tr
id=sl_svn27_2

><td class="source"> * jVal - dynamic jquery form field validation framework<br></td></tr
><tr
id=sl_svn27_3

><td class="source"> *	version 0.1.5<br></td></tr
><tr
id=sl_svn27_4

><td class="source"> * Author: Jim Palmer<br></td></tr
><tr
id=sl_svn27_5

><td class="source"> * Released under MIT license.<br></td></tr
><tr
id=sl_svn27_6

><td class="source"> */<br></td></tr
><tr
id=sl_svn27_7

><td class="source">(function($) {<br></td></tr
><tr
id=sl_svn27_8

><td class="source">	// core jVal function - returns TRUE if all jVal validation passes, false if not<br></td></tr
><tr
id=sl_svn27_9

><td class="source">	$.fn.jVal = function (options) {<br></td></tr
><tr
id=sl_svn27_10

><td class="source">		$.fn.jVal.clean(this);<br></td></tr
><tr
id=sl_svn27_11

><td class="source">		// clear jVal warnings<br></td></tr
><tr
id=sl_svn27_12

><td class="source">		if ((options || &#39;&#39;).toString().toUpperCase() == &#39;CLEAN&#39;)<br></td></tr
><tr
id=sl_svn27_13

><td class="source">			return this; // chainable<br></td></tr
><tr
id=sl_svn27_14

><td class="source">		$.fn.jVal.defaults = $.extend($.fn.jVal.defaults, options);<br></td></tr
><tr
id=sl_svn27_15

><td class="source">		$(this).stop().find(&#39;.jfVal,.jValCover&#39;).stop().remove();<br></td></tr
><tr
id=sl_svn27_16

><td class="source">		var passVal = true, dm = $.fn.jVal.defaults.message, ds = $.fn.jVal.defaults.style;<br></td></tr
><tr
id=sl_svn27_17

><td class="source">		$(this).find(&#39;.jVal,[jVal]:not(:disabled):visible&#39;).each(<br></td></tr
><tr
id=sl_svn27_18

><td class="source">			function () {<br></td></tr
><tr
id=sl_svn27_19

><td class="source">				var cmd = $(this).data(&#39;jVal&#39;);<br></td></tr
><tr
id=sl_svn27_20

><td class="source">				if ( typeof cmd !== &#39;object&#39; ) eval( &#39;cmd = &#39; + ( $(this).data(&#39;jVal&#39;) || $(this).attr(&#39;jVal&#39;) ) + &#39;;&#39; );<br></td></tr
><tr
id=sl_svn27_21

><td class="source">				//$.fn.jVal.clean(this);<br></td></tr
><tr
id=sl_svn27_22

><td class="source">				if ( cmd instanceof Object &amp;&amp; cmd.valid instanceof RegExp &amp;&amp; !cmd.valid.test($(this).val()) ) {<br></td></tr
><tr
id=sl_svn27_23

><td class="source">					$.fn.jVal.showWarning(cmd.target || this, cmd.message || dm, cmd.autoHide || false, cmd.styleType || ds);<br></td></tr
><tr
id=sl_svn27_24

><td class="source">					passVal = false;<br></td></tr
><tr
id=sl_svn27_25

><td class="source">				} else if ( cmd instanceof Object &amp;&amp; cmd.valid instanceof Function ) {<br></td></tr
><tr
id=sl_svn27_26

><td class="source">					var testFRet = cmd.valid( $(this).val(), this );<br></td></tr
><tr
id=sl_svn27_27

><td class="source">					if ( testFRet === false || testFRet.length &gt; 0 ) {<br></td></tr
><tr
id=sl_svn27_28

><td class="source">						$.fn.jVal.showWarning(cmd.target || this, testFRet || cmd.message || dm, cmd.autoHide || false, cmd.styleType || ds);<br></td></tr
><tr
id=sl_svn27_29

><td class="source">						passVal = false;<br></td></tr
><tr
id=sl_svn27_30

><td class="source">					}<br></td></tr
><tr
id=sl_svn27_31

><td class="source">				} else if ( ( cmd instanceof RegExp &amp;&amp; !cmd.test($(this).val()) ) || ( cmd instanceof Function &amp;&amp; !cmd($(this).val()) ) ) {<br></td></tr
><tr
id=sl_svn27_32

><td class="source">					$.fn.jVal.showWarning(cmd.target || this, dm, cmd.autoHide || false, cmd.styleType || ds);<br></td></tr
><tr
id=sl_svn27_33

><td class="source">					passVal = false;<br></td></tr
><tr
id=sl_svn27_34

><td class="source">				}<br></td></tr
><tr
id=sl_svn27_35

><td class="source">			}<br></td></tr
><tr
id=sl_svn27_36

><td class="source">		);<br></td></tr
><tr
id=sl_svn27_37

><td class="source">		return passVal;<br></td></tr
><tr
id=sl_svn27_38

><td class="source">	};<br></td></tr
><tr
id=sl_svn27_39

><td class="source">	// showWarning utility function<br></td></tr
><tr
id=sl_svn27_40

><td class="source">	$.fn.jVal.showWarning = function (elements, message, autoHide, styleType) {<br></td></tr
><tr
id=sl_svn27_41

><td class="source">		var par = $(elements).eq(0).parent();<br></td></tr
><tr
id=sl_svn27_42

><td class="source">		clearTimeout( $(par).data(&#39;autoHide&#39;) ) &amp;&amp; $(par).data(&#39;autoHide&#39;, null);<br></td></tr
><tr
id=sl_svn27_43

><td class="source">		$.fn.jVal.clean(par);<br></td></tr
><tr
id=sl_svn27_44

><td class="source">		$(elements).css({marginTop:&#39;&#39;,position:&#39;&#39;,borderColor:&#39;red&#39;});<br></td></tr
><tr
id=sl_svn27_45

><td class="source">		var dbw = $.fn.jVal.defaults.border,<br></td></tr
><tr
id=sl_svn27_46

><td class="source">			dp = $.fn.jVal.defaults.padding,<br></td></tr
><tr
id=sl_svn27_47

><td class="source">			fieldWidth = 0, fieldHeight = 0,<br></td></tr
><tr
id=sl_svn27_48

><td class="source">			absoluteLeft = $(elements).eq(0).position().left,<br></td></tr
><tr
id=sl_svn27_49

><td class="source">			absoluteTop = $(elements).eq(0).position().top;<br></td></tr
><tr
id=sl_svn27_50

><td class="source">		// normalize multi-element coordinates<br></td></tr
><tr
id=sl_svn27_51

><td class="source">		$(elements).each(function () {<br></td></tr
><tr
id=sl_svn27_52

><td class="source">			fieldWidth += $(this).outerWidth(true);<br></td></tr
><tr
id=sl_svn27_53

><td class="source">			fieldHeight = Math.max( $(elements).outerHeight(true), fieldHeight );<br></td></tr
><tr
id=sl_svn27_54

><td class="source">			absoluteLeft = Math.min( $(this).position().left, absoluteLeft );<br></td></tr
><tr
id=sl_svn27_55

><td class="source">			absoluteTop = Math.min( $(this).position().top, absoluteTop );<br></td></tr
><tr
id=sl_svn27_56

><td class="source">		});<br></td></tr
><tr
id=sl_svn27_57

><td class="source">		var fwidth = 0, tPos = absoluteTop - dp - dbw, lPos = absoluteLeft + dp, rPos = absoluteLeft + fieldWidth + dp,<br></td></tr
><tr
id=sl_svn27_58

><td class="source">			ph = (fieldHeight + (dp * 2)), fhp = fieldHeight + dp + dbw, fwp = fieldWidth + dp,<br></td></tr
><tr
id=sl_svn27_59

><td class="source">			clips = [ <br></td></tr
><tr
id=sl_svn27_60

><td class="source">				&#39;rect(0px, 5000px, &#39; + (dp + dbw) + &#39;px, 0px)&#39;, // top<br></td></tr
><tr
id=sl_svn27_61

><td class="source">				&#39;rect(&#39; + fhp + &#39;px, 5000px, 5000px, 0px)&#39;, // bottom<br></td></tr
><tr
id=sl_svn27_62

><td class="source">				&#39;rect(&#39; + dp + &#39;px, &#39; + dp + &#39;px, 5000px, 0px)&#39;, // left<br></td></tr
><tr
id=sl_svn27_63

><td class="source">				&#39;rect(&#39; + dp + &#39;px, 5000px, 5000px, &#39; + fwp + &#39;px)&#39;]; // right<br></td></tr
><tr
id=sl_svn27_64

><td class="source">		// fixed alerts, no wrapping<br></td></tr
><tr
id=sl_svn27_65

><td class="source">		if (!$.fn.jVal.defaults.wrap) {<br></td></tr
><tr
id=sl_svn27_66

><td class="source">			fieldWidth = ph = fph = 12;<br></td></tr
><tr
id=sl_svn27_67

><td class="source">			rPos = lPos;<br></td></tr
><tr
id=sl_svn27_68

><td class="source">		}<br></td></tr
><tr
id=sl_svn27_69

><td class="source">		$(elements).eq(0).before(<br></td></tr
><tr
id=sl_svn27_70

><td class="source">			&#39;&lt;div class=&quot;jValSpacer jValSpacer&#39; + styleType + &#39;&quot; style=&quot;line-height:&#39; + ph + &#39;px; height:&#39; + ph + &#39;px; clip:&#39; + clips[0] + &#39;; &#39; +<br></td></tr
><tr
id=sl_svn27_71

><td class="source">				&#39;left:&#39; + (absoluteLeft - dp) + &#39;px; top:&#39; + tPos + &#39;px; &#39; + <br></td></tr
><tr
id=sl_svn27_72

><td class="source">				&#39;width:&#39; + (fieldWidth + (dp * 2)) + &#39;px;&quot; /&gt;&#39; +<br></td></tr
><tr
id=sl_svn27_73

><td class="source">			&#39;&lt;div class=&quot;jfVal&#39; + ( styleType ? &#39; jfVal&#39; + styleType : &#39;&#39; ) + &#39;&quot; style=&quot;left:&#39; + lPos + &#39;px; &#39; +<br></td></tr
><tr
id=sl_svn27_74

><td class="source">				&#39;top:&#39; + tPos + &#39;px;&quot;&gt;&#39; +<br></td></tr
><tr
id=sl_svn27_75

><td class="source">				&#39;&lt;div class=&quot;icon&#39; + ( styleType ? &#39; icon&#39; + styleType : &#39;&#39; ) + &#39;&quot; style=&quot;height:&#39; + ph + &#39;px;&quot;&gt;&lt;div class=&quot;iconbg&quot; /&gt;&lt;/div&gt;&#39; +<br></td></tr
><tr
id=sl_svn27_76

><td class="source">				&#39;&lt;div class=&quot;content&#39; + ( styleType ? &#39; content&#39; + styleType : &#39;&#39; ) + &#39;&quot; style=&quot;height:&#39; + ph + &#39;px; line-height:&#39; + ph + &#39;px;&quot;&gt;&#39; +<br></td></tr
><tr
id=sl_svn27_77

><td class="source">					&#39;&lt;span class=&quot;message&#39; + styleType + &#39;&quot;&gt;&#39; + message + &#39;&lt;/span&gt;&#39; +<br></td></tr
><tr
id=sl_svn27_78

><td class="source">				&#39;&lt;/div&gt;&#39; +<br></td></tr
><tr
id=sl_svn27_79

><td class="source">			&#39;&lt;/div&gt;&#39;)<br></td></tr
><tr
id=sl_svn27_80

><td class="source">			.parent().find(&#39;.jfVal&gt;*&#39;).each(function () { fwidth += $(this).outerWidth() }).end()<br></td></tr
><tr
id=sl_svn27_81

><td class="source">			.find(&#39;.jfVal&#39;).width(fwidth + 20);<br></td></tr
><tr
id=sl_svn27_82

><td class="source">		for (var si = 1; si &lt; 4; si++) <br></td></tr
><tr
id=sl_svn27_83

><td class="source">			$(par).find(&#39;.jValSpacer:first&#39;).before( <br></td></tr
><tr
id=sl_svn27_84

><td class="source">				$(par).find(&#39;.jValSpacer:first&#39;).clone().css({clip:clips[si]}) );<br></td></tr
><tr
id=sl_svn27_85

><td class="source">		// autoHide = set spacer width + add autohide function to fx queue<br></td></tr
><tr
id=sl_svn27_86

><td class="source">		if ( autoHide )<br></td></tr
><tr
id=sl_svn27_87

><td class="source">			$(par).data( &#39;autoHide&#39;, setTimeout(function () { $(par).find(&#39;.jfVal&#39;).animate({left:lPos,opacity:0}, 200, function () { $.fn.jVal.clean(par); }); }, 2000) )<br></td></tr
><tr
id=sl_svn27_88

><td class="source">				.find(&#39;.jfVal&#39;).css({&#39;left&#39;:rPos});<br></td></tr
><tr
id=sl_svn27_89

><td class="source">		else<br></td></tr
><tr
id=sl_svn27_90

><td class="source">			$(par).find(&#39;.jfVal&#39;).css({opacity:0}).animate({left:rPos,opacity:1}, 200);<br></td></tr
><tr
id=sl_svn27_91

><td class="source">	};<br></td></tr
><tr
id=sl_svn27_92

><td class="source">	// validate key stroke<br></td></tr
><tr
id=sl_svn27_93

><td class="source">	$.fn.jVal.valKey = function (keyRE, e, cF, cA) {<br></td></tr
><tr
id=sl_svn27_94

><td class="source">		var ek = (typeof(e.keyCode) != &#39;undefined&#39;), ec = (typeof(e.charCode) != &#39;undefined&#39;),<br></td></tr
><tr
id=sl_svn27_95

><td class="source">			k = e.keyCode, c = e.charCode, ks = k.toString();<br></td></tr
><tr
id=sl_svn27_96

><td class="source">		// return if invalid regex<br></td></tr
><tr
id=sl_svn27_97

><td class="source">		if ( !(keyRE instanceof RegExp) ) <br></td></tr
><tr
id=sl_svn27_98

><td class="source">			return false;<br></td></tr
><tr
id=sl_svn27_99

><td class="source">		// test for ENTER key and cF being valid function otherwise return true<br></td></tr
><tr
id=sl_svn27_100

><td class="source">		if ( /^13$/.test(String(k || c)) ) {<br></td></tr
><tr
id=sl_svn27_101

><td class="source">			try { (this[cF]) ? this[cF](cA) : eval(cF); } catch(e) { return true; }<br></td></tr
><tr
id=sl_svn27_102

><td class="source">			return -1;<br></td></tr
><tr
id=sl_svn27_103

><td class="source">		}<br></td></tr
><tr
id=sl_svn27_104

><td class="source">		// otherwise test for valid keys supported by the regex allowing meta keys by default<br></td></tr
><tr
id=sl_svn27_105

><td class="source">		if	( e.ctrlKey || e.shiftKey || e.metaKey || (<br></td></tr
><tr
id=sl_svn27_106

><td class="source">				ek &amp;&amp; k &gt; 0 &amp;&amp; keyRE.test(String.fromCharCode(k)) ) ||<br></td></tr
><tr
id=sl_svn27_107

><td class="source">				( ec &amp;&amp; c &gt; 0 &amp;&amp; String.fromCharCode(c).search(keyRE) != (-1) ) ||<br></td></tr
><tr
id=sl_svn27_108

><td class="source">				( ec &amp;&amp; c != k &amp;&amp; ek &amp;&amp; ks.search(/^(8|9|45|46|35|36|37|39)$/) != (-1) ) ||<br></td></tr
><tr
id=sl_svn27_109

><td class="source">				( ec &amp;&amp; c == k &amp;&amp; ek &amp;&amp; ks.search(/^(8|9)$/) != (-1) ||<br></td></tr
><tr
id=sl_svn27_110

><td class="source">				( !ec &amp;&amp; ek &amp;&amp; ks.search(/^(8|9|45|46|35|36|37|39)$/) != (-1) ) ) <br></td></tr
><tr
id=sl_svn27_111

><td class="source">			) {<br></td></tr
><tr
id=sl_svn27_112

><td class="source">			return 1;<br></td></tr
><tr
id=sl_svn27_113

><td class="source">		} else {<br></td></tr
><tr
id=sl_svn27_114

><td class="source">			return 0;<br></td></tr
><tr
id=sl_svn27_115

><td class="source">		}<br></td></tr
><tr
id=sl_svn27_116

><td class="source">	};<br></td></tr
><tr
id=sl_svn27_117

><td class="source">	// clear all displayed jVal warnings within scope<br></td></tr
><tr
id=sl_svn27_118

><td class="source">	$.fn.jVal.clean = function (target) {<br></td></tr
><tr
id=sl_svn27_119

><td class="source">		$(target)<br></td></tr
><tr
id=sl_svn27_120

><td class="source">			.find(&#39;.jfVal,.jValSpacer&#39;).stop().remove().end()<br></td></tr
><tr
id=sl_svn27_121

><td class="source">			.find(&#39;.jVal,[jVal]&#39;).css({position:&#39;&#39;,borderColor:&#39;&#39;,left:&#39;0px&#39;,top:&#39;0px&#39;}).parent().find(&#39;.jValRelWrap&#39;).remove();<br></td></tr
><tr
id=sl_svn27_122

><td class="source">	};<br></td></tr
><tr
id=sl_svn27_123

><td class="source">	$.fn.jVal.init = function (options) {<br></td></tr
><tr
id=sl_svn27_124

><td class="source">		$.fn.jVal.defaults = $.extend($.fn.jVal.defaults, options);<br></td></tr
><tr
id=sl_svn27_125

><td class="source">		$(&#39;.jVal,[jVal]&#39;).filter(&#39;:not(:disabled)&#39;).unbind(&quot;blur&quot;).bind(&quot;blur&quot;, function (e) { <br></td></tr
><tr
id=sl_svn27_126

><td class="source">			if ($.fn.jVal.defaults.blurCheck || $(this).hasClass(&#39;jValBlur&#39;))<br></td></tr
><tr
id=sl_svn27_127

><td class="source">				$(this).parent().jVal();<br></td></tr
><tr
id=sl_svn27_128

><td class="source">		});<br></td></tr
><tr
id=sl_svn27_129

><td class="source">		var keyFunc = function (e) {<br></td></tr
><tr
id=sl_svn27_130

><td class="source">			eval( &#39;var cmd = &#39; + ( $(this).data(&#39;jValKey&#39;) || $(this).attr(&#39;jValKey&#39;) || $(this).data(&#39;jValKeyUp&#39;) || $(this).attr(&#39;jValKeyUp&#39;) ) + &#39;;&#39; );<br></td></tr
><tr
id=sl_svn27_131

><td class="source">			var keyTest, ds = $.fn.jVal.defaults.style, dkm = $.fn.jVal.defaults.keyMessage,<br></td></tr
><tr
id=sl_svn27_132

><td class="source">				autoHide = typeof(cmd.autoHide) != &#39;undefined&#39; ? cmd.autoHide : true;<br></td></tr
><tr
id=sl_svn27_133

><td class="source">			if ( cmd instanceof Object &amp;&amp; cmd.valid instanceof Function ) {<br></td></tr
><tr
id=sl_svn27_134

><td class="source">				keyTest = cmd.valid( e, this );<br></td></tr
><tr
id=sl_svn27_135

><td class="source">				if ( keyTest === false || keyTest.length &gt; 0 ) {<br></td></tr
><tr
id=sl_svn27_136

><td class="source">					$.fn.jVal.clean(cmd.target || this);<br></td></tr
><tr
id=sl_svn27_137

><td class="source">					// only show warning and allow keypress event to return true<br></td></tr
><tr
id=sl_svn27_138

><td class="source">					$.fn.jVal.showWarning(cmd.target || this, ( keyTest || (cmd.message || dkm).replace(&#39;%c&#39;, String.fromCharCode(e.keyCode || e.charCode))), autoHide, cmd.styleType || ds);<br></td></tr
><tr
id=sl_svn27_139

><td class="source">				} else <br></td></tr
><tr
id=sl_svn27_140

><td class="source">					$.fn.jVal.clean($(cmd.target || this).parent());<br></td></tr
><tr
id=sl_svn27_141

><td class="source">			} else {<br></td></tr
><tr
id=sl_svn27_142

><td class="source">				keyTest = $.fn.jVal.valKey( ( (cmd instanceof Object) ? cmd.valid : cmd ), e, (cmd instanceof Object) ? cmd.cFunc : null, (cmd instanceof Object) ? cmd.cArgs : null );<br></td></tr
><tr
id=sl_svn27_143

><td class="source">				if ( keyTest == 0 ) {<br></td></tr
><tr
id=sl_svn27_144

><td class="source">					$.fn.jVal.clean(cmd.target || this);<br></td></tr
><tr
id=sl_svn27_145

><td class="source">					$.fn.jVal.showWarning(cmd.target || this, (( cmd instanceof Object &amp;&amp; cmd.message) || dkm).replace(&#39;%c&#39;, String.fromCharCode(e.keyCode || e.charCode)), autoHide, cmd.styleType || ds);<br></td></tr
><tr
id=sl_svn27_146

><td class="source">					return false;<br></td></tr
><tr
id=sl_svn27_147

><td class="source">				} else if ( keyTest == -1 ) <br></td></tr
><tr
id=sl_svn27_148

><td class="source">					return false;<br></td></tr
><tr
id=sl_svn27_149

><td class="source">				else <br></td></tr
><tr
id=sl_svn27_150

><td class="source">					$.fn.jVal.clean($(cmd.target || this).parent());<br></td></tr
><tr
id=sl_svn27_151

><td class="source">			}<br></td></tr
><tr
id=sl_svn27_152

><td class="source">			return true;<br></td></tr
><tr
id=sl_svn27_153

><td class="source">		};<br></td></tr
><tr
id=sl_svn27_154

><td class="source">		$(&#39;.jValKey,[jValKey]&#39;).filter(&#39;:not(:disabled)&#39;).unbind(&quot;keypress&quot;).bind(&quot;keypress&quot;, keyFunc);<br></td></tr
><tr
id=sl_svn27_155

><td class="source">		$(&#39;.jValKeyUp,[jValKeyUp]&#39;).filter(&#39;:not(:disabled)&#39;).unbind(&quot;keyup&quot;).bind(&quot;keyup&quot;, keyFunc);<br></td></tr
><tr
id=sl_svn27_156

><td class="source">		return this; // chainable<br></td></tr
><tr
id=sl_svn27_157

><td class="source">	};<br></td></tr
><tr
id=sl_svn27_158

><td class="source">	// jVal defaults<br></td></tr
><tr
id=sl_svn27_159

><td class="source">	$.fn.jVal.defaults = {<br></td></tr
><tr
id=sl_svn27_160

><td class="source">		blurCheck: false,<br></td></tr
><tr
id=sl_svn27_161

><td class="source">		message: &#39;Invalid entry&#39;,<br></td></tr
><tr
id=sl_svn27_162

><td class="source">		style: &#39;pod&#39;,<br></td></tr
><tr
id=sl_svn27_163

><td class="source">		keyMessage: &#39;&quot;%c&quot; Invalid character&#39;,<br></td></tr
><tr
id=sl_svn27_164

><td class="source">		padding: 3,<br></td></tr
><tr
id=sl_svn27_165

><td class="source">		border: 1,<br></td></tr
><tr
id=sl_svn27_166

><td class="source">		wrap: true<br></td></tr
><tr
id=sl_svn27_167

><td class="source">	};<br></td></tr
><tr
id=sl_svn27_168

><td class="source">	// automatically init on dom load<br></td></tr
><tr
id=sl_svn27_169

><td class="source">	$($.fn.jVal.init);<br></td></tr
><tr
id=sl_svn27_170

><td class="source">})(jQuery);<br></td></tr
></table></pre>
<pre class="prettyprint"><table width="100%"><tr class="cursor_stop cursor_hidden"><td></td></tr></table></pre>
</td>
</tr></table>
<script type="text/javascript">
 var lineNumUnderMouse = -1;
 
 function gutterOver(num) {
 gutterOut();
 var newTR = document.getElementById('gr_svn27_' + num);
 if (newTR) {
 newTR.className = 'undermouse';
 }
 lineNumUnderMouse = num;
 }
 function gutterOut() {
 if (lineNumUnderMouse != -1) {
 var oldTR = document.getElementById(
 'gr_svn27_' + lineNumUnderMouse);
 if (oldTR) {
 oldTR.className = '';
 }
 lineNumUnderMouse = -1;
 }
 }
 var numsGenState = {table_base_id: 'nums_table_'};
 var srcGenState = {table_base_id: 'src_table_'};
 var alignerRunning = false;
 var startOver = false;
 function setLineNumberHeights() {
 if (alignerRunning) {
 startOver = true;
 return;
 }
 numsGenState.chunk_id = 0;
 numsGenState.table = document.getElementById('nums_table_0');
 numsGenState.row_num = 0;
 srcGenState.chunk_id = 0;
 srcGenState.table = document.getElementById('src_table_0');
 srcGenState.row_num = 0;
 alignerRunning = true;
 continueToSetLineNumberHeights();
 }
 function rowGenerator(genState) {
 if (genState.row_num < genState.table.rows.length) {
 var currentRow = genState.table.rows[genState.row_num];
 genState.row_num++;
 return currentRow;
 }
 var newTable = document.getElementById(
 genState.table_base_id + (genState.chunk_id + 1));
 if (newTable) {
 genState.chunk_id++;
 genState.row_num = 0;
 genState.table = newTable;
 return genState.table.rows[0];
 }
 return null;
 }
 var MAX_ROWS_PER_PASS = 1000;
 function continueToSetLineNumberHeights() {
 var rowsInThisPass = 0;
 var numRow = 1;
 var srcRow = 1;
 while (numRow && srcRow && rowsInThisPass < MAX_ROWS_PER_PASS) {
 numRow = rowGenerator(numsGenState);
 srcRow = rowGenerator(srcGenState);
 rowsInThisPass++;
 if (numRow && srcRow) {
 if (numRow.offsetHeight != srcRow.offsetHeight) {
 numRow.firstChild.style.height = srcRow.offsetHeight + 'px';
 }
 }
 }
 if (rowsInThisPass >= MAX_ROWS_PER_PASS) {
 setTimeout(continueToSetLineNumberHeights, 10);
 } else {
 alignerRunning = false;
 if (startOver) {
 startOver = false;
 setTimeout(setLineNumberHeights, 500);
 }
 }
 }
 // Do 2 complete passes, because there can be races
 // between this code and prettify.
 startOver = true;
 setTimeout(setLineNumberHeights, 250);
 window.onresize = setLineNumberHeights;
</script>

 
 
 <div id="log">
 <div style="text-align:right">
 <a class="ifCollapse" href="#" onclick="_toggleMeta('', 'p', 'jquery-jval', this)">Show details</a>
 <a class="ifExpand" href="#" onclick="_toggleMeta('', 'p', 'jquery-jval', this)">Hide details</a>
 </div>
 <div class="ifExpand">
 
 <div class="pmeta_bubble_bg" style="border:1px solid white">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <div id="changelog">
 <p>Change log</p>
 <div>
 <a href="/p/jquery-jval/source/detail?spec=svn27&r=27">r27</a>
 by jimpalmer
 on Oct 02, 2009
 &nbsp; <a href="/p/jquery-jval/source/diff?spec=svn27&r=27&amp;format=side&amp;path=/trunk/jVal.js&amp;old_path=/trunk/jVal.js&amp;old=26">Diff</a>
 </div>
 <pre>proper assignment of width to the absolute
positioned flyout parent container block</pre>
 </div>
 
 
 
 
 
 
 <script type="text/javascript">
 var detail_url = '/p/jquery-jval/source/detail?r=27&spec=svn27';
 var publish_url = '/p/jquery-jval/source/detail?r=27&spec=svn27#publish';
 // describe the paths of this revision in javascript.
 var changed_paths = [];
 var changed_urls = [];
 
 changed_paths.push('/trunk/jVal.js');
 changed_urls.push('/p/jquery-jval/source/browse/trunk/jVal.js?r=27&spec=svn27');
 
 var selected_path = '/trunk/jVal.js';
 
 
 function getCurrentPageIndex() {
 for (var i = 0; i < changed_paths.length; i++) {
 if (selected_path == changed_paths[i]) {
 return i;
 }
 }
 }
 function getNextPage() {
 var i = getCurrentPageIndex();
 if (i < changed_paths.length - 1) {
 return changed_urls[i + 1];
 }
 return null;
 }
 function getPreviousPage() {
 var i = getCurrentPageIndex();
 if (i > 0) {
 return changed_urls[i - 1];
 }
 return null;
 }
 function gotoNextPage() {
 var page = getNextPage();
 if (!page) {
 page = detail_url;
 }
 window.location = page;
 }
 function gotoPreviousPage() {
 var page = getPreviousPage();
 if (!page) {
 page = detail_url;
 }
 window.location = page;
 }
 function gotoDetailPage() {
 window.location = detail_url;
 }
 function gotoPublishPage() {
 window.location = publish_url;
 }
</script>
 
 <style type="text/css">
 #review_nav {
 border-top: 3px solid white;
 padding-top: 6px;
 margin-top: 1em;
 }
 #review_nav td {
 vertical-align: middle;
 }
 #review_nav select {
 margin: .5em 0;
 }
 </style>
 <div id="review_nav">
 <table><tr><td>Go to:&nbsp;</td><td>
 <select name="files_in_rev" onchange="window.location=this.value">
 
 <option value="/p/jquery-jval/source/browse/trunk/jVal.js?r=27&amp;spec=svn27"
 selected="selected"
 >/trunk/jVal.js</option>
 
 </select>
 </td></tr></table>
 
 
 



 <div style="white-space:nowrap">
 Project members,
 <a href="https://www.google.com/accounts/ServiceLogin?service=code&amp;ltmpl=phosting&amp;continue=http%3A%2F%2Fcode.google.com%2Fp%2Fjquery-jval%2Fsource%2Fbrowse%2Ftrunk%2FjVal.js&amp;followup=http%3A%2F%2Fcode.google.com%2Fp%2Fjquery-jval%2Fsource%2Fbrowse%2Ftrunk%2FjVal.js"
 >sign in</a> to write a code review</div>


 
 </div>
 
 
 </div>
 <div class="round1"></div>
 <div class="round2"></div>
 <div class="round4"></div>
 </div>
 <div class="pmeta_bubble_bg" style="border:1px solid white">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <div id="older_bubble">
 <p>Older revisions</p>
 
 
 <div class="closed" style="margin-bottom:3px;" >
 <img class="ifClosed" onclick="_toggleHidden(this)" src="http://www.gstatic.com/codesite/ph/images/plus.gif" >
 <img class="ifOpened" onclick="_toggleHidden(this)" src="http://www.gstatic.com/codesite/ph/images/minus.gif" >
 <a href="/p/jquery-jval/source/detail?spec=svn27&r=26">r26</a>
 by jimpalmer
 on Sep 25, 2009
 &nbsp; <a href="/p/jquery-jval/source/diff?spec=svn27&r=26&amp;format=side&amp;path=/trunk/jVal.js&amp;old_path=/trunk/jVal.js&amp;old=25">Diff</a>
 <br>
 <pre class="ifOpened">better integrated example + fix
showwarning instantiation</pre>
 </div>
 
 <div class="closed" style="margin-bottom:3px;" >
 <img class="ifClosed" onclick="_toggleHidden(this)" src="http://www.gstatic.com/codesite/ph/images/plus.gif" >
 <img class="ifOpened" onclick="_toggleHidden(this)" src="http://www.gstatic.com/codesite/ph/images/minus.gif" >
 <a href="/p/jquery-jval/source/detail?spec=svn27&r=25">r25</a>
 by jimpalmer
 on Sep 25, 2009
 &nbsp; <a href="/p/jquery-jval/source/diff?spec=svn27&r=25&amp;format=side&amp;path=/trunk/jVal.js&amp;old_path=/trunk/jVal.js&amp;old=23">Diff</a>
 <br>
 <pre class="ifOpened">using opacity animation + fix spacing
on 'blank' layout</pre>
 </div>
 
 <div class="closed" style="margin-bottom:3px;" >
 <img class="ifClosed" onclick="_toggleHidden(this)" src="http://www.gstatic.com/codesite/ph/images/plus.gif" >
 <img class="ifOpened" onclick="_toggleHidden(this)" src="http://www.gstatic.com/codesite/ph/images/minus.gif" >
 <a href="/p/jquery-jval/source/detail?spec=svn27&r=23">r23</a>
 by jimpalmer
 on Sep 25, 2009
 &nbsp; <a href="/p/jquery-jval/source/diff?spec=svn27&r=23&amp;format=side&amp;path=/trunk/jVal.js&amp;old_path=/trunk/jVal.js&amp;old=22">Diff</a>
 <br>
 <pre class="ifOpened">support for attribute or onload jval
event binding + ability to disable
blur per field + more code cleanup +
less jquery namespace clutter and
public clean, init and showwarning
...</pre>
 </div>
 
 
 <a href="/p/jquery-jval/source/list?path=/trunk/jVal.js&start=27">All revisions of this file</a>
 </div>
 </div>
 <div class="round1"></div>
 <div class="round2"></div>
 <div class="round4"></div>
 </div>
 <div class="pmeta_bubble_bg" style="border:1px solid white">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <div id="fileinfo_bubble">
 <p>File info</p>
 
 <div>Size: 8301 bytes,
 170 lines</div>
 
 <div><a href="http://jquery-jval.googlecode.com/svn/trunk/jVal.js">View raw file</a></div>
 </div>
 
 </div>
 <div class="round1"></div>
 <div class="round2"></div>
 <div class="round4"></div>
 </div>
 </div>
 </div>


</div>
</div>

<script src="http://www.gstatic.com/codesite/ph/12904809565893879022/js/prettify/prettify.js"></script>
<script type="text/javascript">prettyPrint();</script>

<script src="http://www.gstatic.com/codesite/ph/12904809565893879022/js/source_file_scripts.js"></script>

 <script type="text/javascript" src="http://kibbles.googlecode.com/files/kibbles-1.3.1.comp.js"></script>
 <script type="text/javascript">
 var lastStop = null;
 var initilized = false;
 
 function updateCursor(next, prev) {
 if (prev && prev.element) {
 prev.element.className = 'cursor_stop cursor_hidden';
 }
 if (next && next.element) {
 next.element.className = 'cursor_stop cursor';
 lastStop = next.index;
 }
 }
 
 function pubRevealed(data) {
 updateCursorForCell(data.cellId, 'cursor_stop cursor_hidden');
 if (initilized) {
 reloadCursors();
 }
 }
 
 function draftRevealed(data) {
 updateCursorForCell(data.cellId, 'cursor_stop cursor_hidden');
 if (initilized) {
 reloadCursors();
 }
 }
 
 function draftDestroyed(data) {
 updateCursorForCell(data.cellId, 'nocursor');
 if (initilized) {
 reloadCursors();
 }
 }
 function reloadCursors() {
 kibbles.skipper.reset();
 loadCursors();
 if (lastStop != null) {
 kibbles.skipper.setCurrentStop(lastStop);
 }
 }
 // possibly the simplest way to insert any newly added comments
 // is to update the class of the corresponding cursor row,
 // then refresh the entire list of rows.
 function updateCursorForCell(cellId, className) {
 var cell = document.getElementById(cellId);
 // we have to go two rows back to find the cursor location
 var row = getPreviousElement(cell.parentNode);
 row.className = className;
 }
 // returns the previous element, ignores text nodes.
 function getPreviousElement(e) {
 var element = e.previousSibling;
 if (element.nodeType == 3) {
 element = element.previousSibling;
 }
 if (element && element.tagName) {
 return element;
 }
 }
 function loadCursors() {
 // register our elements with skipper
 var elements = CR_getElements('*', 'cursor_stop');
 var len = elements.length;
 for (var i = 0; i < len; i++) {
 var element = elements[i]; 
 element.className = 'cursor_stop cursor_hidden';
 kibbles.skipper.append(element);
 }
 }
 function toggleComments() {
 CR_toggleCommentDisplay();
 reloadCursors();
 }
 function keysOnLoadHandler() {
 // setup skipper
 kibbles.skipper.addStopListener(
 kibbles.skipper.LISTENER_TYPE.PRE, updateCursor);
 // Set the 'offset' option to return the middle of the client area
 // an option can be a static value, or a callback
 kibbles.skipper.setOption('padding_top', 50);
 // Set the 'offset' option to return the middle of the client area
 // an option can be a static value, or a callback
 kibbles.skipper.setOption('padding_bottom', 100);
 // Register our keys
 kibbles.skipper.addFwdKey("n");
 kibbles.skipper.addRevKey("p");
 kibbles.keys.addKeyPressListener(
 'u', function() { window.location = detail_url; });
 kibbles.keys.addKeyPressListener(
 'r', function() { window.location = detail_url + '#publish'; });
 
 kibbles.keys.addKeyPressListener('j', gotoNextPage);
 kibbles.keys.addKeyPressListener('k', gotoPreviousPage);
 
 
 }
 window.onload = function() {keysOnLoadHandler();};
 </script>

<!-- code review support -->
<script src="http://www.gstatic.com/codesite/ph/12904809565893879022/js/code_review_scripts.js"></script>
<script type="text/javascript">
 
 // the comment form template
 var form = '<div class="draft"><div class="header"><span class="title">Draft comment:</span></div>' +
 '<div class="body"><form onsubmit="return false;"><textarea id="$ID">$BODY</textarea><br>$ACTIONS</form></div>' +
 '</div>';
 // the comment "plate" template used for both draft and published comment "plates".
 var draft_comment = '<div class="draft" ondblclick="$ONDBLCLICK">' +
 '<div class="header"><span class="title">Draft comment:</span><span class="actions">$ACTIONS</span></div>' +
 '<pre id="$ID" class="body">$BODY</pre>' +
 '</div>';
 var published_comment = '<div class="published">' +
 '<div class="header"><span class="title"><a href="$PROFILE_URL">$AUTHOR:</a></span><div>' +
 '<pre id="$ID" class="body">$BODY</pre>' +
 '</div>';

 function showPublishInstructions() {
 var element = document.getElementById('review_instr');
 if (element) {
 element.className = 'opened';
 }
 }
 function revsOnLoadHandler() {
 // register our source container with the commenting code
 var paths = {'svn27': '/trunk/jVal.js'}
 CR_setup('', 'p', 'jquery-jval', '', 'svn27', paths,
 '', CR_BrowseIntegrationFactory);
 // register our hidden ui elements with the code commenting code ui builder.
 CR_registerLayoutElement('form', form);
 CR_registerLayoutElement('draft_comment', draft_comment);
 CR_registerLayoutElement('published_comment', published_comment);
 
 CR_registerActivityListener(CR_ACTIVITY_TYPE.REVEAL_DRAFT_PLATE, showPublishInstructions);
 
 CR_registerActivityListener(CR_ACTIVITY_TYPE.REVEAL_PUB_PLATE, pubRevealed);
 CR_registerActivityListener(CR_ACTIVITY_TYPE.REVEAL_DRAFT_PLATE, draftRevealed);
 CR_registerActivityListener(CR_ACTIVITY_TYPE.DISCARD_DRAFT_COMMENT, draftDestroyed);
 
 
 
 
 
 
 
 
 
 var initilized = true;
 reloadCursors();
 }
 window.onload = function() {keysOnLoadHandler(); revsOnLoadHandler();};
</script>
<script type="text/javascript" src="http://www.gstatic.com/codesite/ph/12904809565893879022/js/dit_scripts.js"></script>

 
 
 <script type="text/javascript" src="http://www.gstatic.com/codesite/ph/12904809565893879022/js/core_scripts_20081103.js"></script>
 <script type="text/javascript" src="/js/codesite_product_dictionary_ph.pack.04102009.js"></script>
 </div>
<div id="footer" dir="ltr">
 
 <div class="text">
 
 &copy;2010 Google -
 <a href="/projecthosting/terms.html">Terms</a> -
 <a href="http://www.google.com/privacy.html">Privacy</a> -
 <a href="/p/support/">Project Hosting Help</a>
 
 </div>
</div>

 <div class="hostedBy" style="margin-top: -20px;">
 <span style="vertical-align: top;">Powered by <a href="http://code.google.com/projecthosting/">Google Project Hosting</a></span>
 </div>
 
 


 
 </body>
</html>

