Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (42 sloc) 1.123 kb
<!DOCTYPE HTML>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="jquery-creditcards.js"></script>
<link src="creditcardsprite.css"/>
</head>
<body>
<form>
<p>Using plugin in default mode</p>
<div id="cc"></div>
<br />
<br />
<p>Using plugin in config'd mode</p>
<div id="cc2">
<div id="textboxHolder">
<input type="text" name="MyCustomTextBox" id="myCustomTextBox" value="" >
<input type="text" name="MyCustomCCVTextBox" id="myCustomCCV" value="" >
</div>
<div id="imageHolder"></div>
</div>
</form>
<script>
$(document).ready(
function ()
{
// Just create the credit card validation control
$("#cc").creditcardvalidation( );
// Create the credit card validation using custom html
$("#cc2").creditcardvalidation( {
inputTextBoxID: "myCustomTextBox",
imageDivID: "imageHolder",
ccvTextBoxID: "myCustomCCV",
callback: function () {
alert ("Is CCN valid? " + this.isCCNvalid + " | Is CCV valid? " + this.isCCVvalid);
}
});
}
)
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.