Permalink
Browse files

Demo: fixed resources paths

  • Loading branch information...
1 parent 9935230 commit f2b90b030901319363c119829c5cc6551a474490 @PawelDecowski PawelDecowski committed Feb 20, 2012
Showing with 12 additions and 12 deletions.
  1. +1 −1 demo/demo.css
  2. +1 −1 demo/demo.less
  3. +10 −10 demo/index.html
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -12,7 +12,7 @@ body {
}
.cards li {
- background-image: url(../images/card_logos.png);
+ background-image: url(card_logos.png);
background-position: 0 0;
float: left;
height: 32px;
View
@@ -1,13 +1,13 @@
<!DOCTYPE HTML>
-<html lang="en-US">
+<html lang="en-GB">
<head>
<meta charset="UTF-8">
- <title>Cards</title>
+ <title>jQuery Credit Card Validator Demo</title>
- <link rel="stylesheet" href="css/cards.css">
+ <link rel="stylesheet" href="demo.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script type="text/javascript" src="js/cards.js"></script>
+ <script type="text/javascript" src="../jquery.creditCardValidator.js"></script>
</head>
<body>
<form>
@@ -59,26 +59,26 @@
</li>
<li>
- <label for="">Your name</label>
- <input type="text" name="name" id="name">
+ <label for="name_on_card">Name on card</label>
+ <input type="text" name="name_on_card" id="name_on_card">
</li>
</ul>
</form>
<script>
$(function() {
$('.vertical.maestro').hide().css({opacity: 0});
- $('#card_number').cards(function(type) {
- if (type == '') {
+ $('#card_number').cards(function(result) {
+ if (result.card_type === null) {
$('.cards li').removeClass('off');
$('.vertical.maestro').slideUp({duration: 200}).animate({opacity:0}, {queue: false, duration: 200});
return;
}
$('.cards li').addClass('off');
- $('.cards .' + type).removeClass('off');
+ $('.cards .' + result.card_type.name).removeClass('off');
- if (type == 'maestro') {
+ if (result.card_type.name == 'maestro') {
$('.vertical.maestro').slideDown({duration: 200}).animate({opacity:1}, {queue: false});
} else {
$('.vertical.maestro').slideUp({duration: 200}).animate({opacity:0}, {queue: false, duration: 200});

0 comments on commit f2b90b0

Please sign in to comment.