Skip to content

Commit 1122c04

Browse files
committed
Fix multipart demo
1 parent 69bb292 commit 1122c04

File tree

4 files changed

+21
-1265
lines changed

4 files changed

+21
-1265
lines changed

demo/multipart/index.html

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1+
<!DOCTYPE html>
2+
<html lang="en">
33
<head>
4-
4+
<meta charset="utf-8">
55
<title>jQuery accordion form with validation</title>
66

7-
<link rel="stylesheet" href="../assets/demo_blue.css" type="text/css" />
7+
<script src="../../lib/jquery.js"></script>
8+
<script src="../../jquery.validate.js"></script>
89

9-
<script type="text/javascript" src="../../lib/jquery.js"></script>
10-
<script type="text/javascript" src="../../jquery.validate.js"></script>
11-
<script type="text/javascript" src="js/jquery.maskedinput-1.0.js"></script>
12-
<script type="text/javascript" src="js/ui.core.js"></script>
13-
<script type="text/javascript" src="js/ui.accordion.js"></script>
10+
<script src="../marketo/jquery.maskedinput.js"></script>
11+
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.min.js"></script>
1412

1513
<script type="text/javascript">
1614
$(document).ready(function(){
1715

1816
$("#recordClientPhone").mask("(999) 999-9999");
1917
$("#recordClientPhoneAlt").mask("(999) 999-9999");
2018
$("#recordClientZip").mask("99999");
21-
$("#recordPropertyZip").mask("99999");
22-
$("#recordPurchaseZip").mask("99999");
19+
$("#recordPropertyZip").mask("99999");
20+
$("#recordPurchaseZip").mask("99999");
2321

2422
// add * to required field labels
2523
$('label.required').append('&nbsp;<strong>*</strong>&nbsp;');
2624

2725
// accordion functions
28-
var accordion = $("#stepForm").accordion();
26+
var accordion = $("#stepForm").accordion();
2927
var current = 0;
30-
28+
3129
$.validator.addMethod("pageRequired", function(value, element) {
3230
var $element = $(element)
3331
function match(index) {
@@ -38,7 +36,7 @@
3836
}
3937
return "dependency-mismatch";
4038
}, $.validator.messages.required)
41-
39+
4240
var v = $("#cmaForm").validate({
4341
errorClass: "warning",
4442
onkeyup: false,
@@ -47,36 +45,36 @@
4745
alert("Submitted, thanks!");
4846
}
4947
});
50-
48+
5149
// back buttons do not need to run validation
5250
$("#sf2 .prevbutton").click(function(){
53-
accordion.accordion("activate", 0);
51+
accordion.accordion("option", "active", 0);
5452
current = 0;
55-
});
53+
});
5654
$("#sf3 .prevbutton").click(function(){
57-
accordion.accordion("activate", 1);
55+
accordion.accordion("option", "active", 1);
5856
current = 1;
59-
});
57+
});
6058
// these buttons all run the validation, overridden by specific targets above
6159
$(".open2").click(function() {
6260
if (v.form()) {
63-
accordion.accordion("activate", 2);
61+
accordion.accordion("option", "active", 2);
6462
current = 2;
6563
}
6664
});
6765
$(".open1").click(function() {
6866
if (v.form()) {
69-
accordion.accordion("activate", 1);
67+
accordion.accordion("option", "active", 1);
7068
current = 1;
7169
}
7270
});
7371
$(".open0").click(function() {
7472
if (v.form()) {
75-
accordion.accordion("activate", 0);
73+
accordion.accordion("option", "active", 0);
7674
current = 0;
7775
}
7876
});
79-
77+
8078
});
8179
</script>
8280

demo/multipart/js/jquery.maskedinput-1.0.js

Lines changed: 0 additions & 246 deletions
This file was deleted.

0 commit comments

Comments
 (0)