🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

An ultra-light (less than 1kb) jQuery Math Captcha plugin that is easy to integrate into your webpage for preventing spam on forms.

Captcha

Documentation

jQuery Captcha Basic

npm npm npm

A basic math captcha plugin for jQuery

Demo

View Demo

Usage

Getting Started

  • Install jquery-captcha-basic from npm:
$ npm install jquery-captcha-basic
  • Add the JavaScript file reference to your web site.
  • Select the form you want to show a captcha for.
  • Run the captcha() method on the form with the options you want.
  • Plugin will add a simple math sum text and an input box before the submit button.

Initialization

The basic initialization example:

$(document).ready(function() {   $("#my-form").captcha(); });

Initialization example with all options set:

$(document).ready(function() {   $("#my-form").captcha({     idCaptchaText: 'customCaptchaTextId',     idCaptchaInput: 'customCaptchaInputId',     class: 'button-primary'   }); });

Plugin Options

  • idCaptchaText: The ID for the captcha text. Default is captchaText.
  • idCaptchaInput: The ID for the captcha input. Default is captchaInput.
  • class: Class name for the submit button toggle. Default is an empty string: ''.

Development

After cloning the repo and making your changes, you can use gulp command to uglify js files.

Reporting Bugs

For bug reports, questions, feature requests, or other suggestions the best way to contact me is to create an issue on GitHub.

Contributor Guide

Make the plugin better! Join the contributors today by submitting a patch! The best way to submit patches is to fork this project on GitHub and submit a pull request. But if you are unwilling or unable to use GitHub I will accept patches in any way you can get them to me (JSFiddle, Pastebin, text file, whatever).

References

Thanks to these valuable sources, I could start this project.


You May Also Like