Skip to content

Commit

Permalink
consistently use single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
lookfirst committed Nov 30, 2011
1 parent 985a3f3 commit cc68330
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/form2js.js
Expand Up @@ -52,7 +52,7 @@ var form2js = (function()
i = 0;

/* If rootNode is array - combine values */
if (rootNode.constructor == Array || (typeof NodeList != "undefined" && rootNode.constructor == NodeList))
if (rootNode.constructor == Array || (typeof NodeList != 'undefined' && rootNode.constructor == NodeList))
{
while(currNode = rootNode[i++])
{
Expand Down Expand Up @@ -274,8 +274,8 @@ var form2js = (function()
switch (fieldNode.type.toLowerCase()) {
case 'radio':
case 'checkbox':
if (fieldNode.checked && fieldNode.value === "true") return true;
if (!fieldNode.checked && fieldNode.value === "true") return false;
if (fieldNode.checked && fieldNode.value === 'true') return true;
if (!fieldNode.checked && fieldNode.value === 'true') return false;
if (fieldNode.checked) return fieldNode.value;
break;

Expand Down Expand Up @@ -312,7 +312,7 @@ var form2js = (function()

if (!multiple) return selectNode.value;

for (options = selectNode.getElementsByTagName("option"), i = 0, l = options.length; i < l; i++)
for (options = selectNode.getElementsByTagName('option'), i = 0, l = options.length; i < l; i++)
{
if (options[i].selected) result.push(options[i].value);
}
Expand Down

0 comments on commit cc68330

Please sign in to comment.