hideshowpassword
Advanced tools
Comparing version 2.0.10 to 2.1.0
@@ -55,2 +55,7 @@ (function (factory) { | ||
// Event to trigger whenever the element is toggled. | ||
// For example, if 'focus' it will focus the cursor in the | ||
// input element after toggling. | ||
triggerOnToggle: false, | ||
// Class to add to input element when the plugin is enabled. | ||
@@ -167,5 +172,5 @@ className: 'hideShowPassword-field', | ||
content: 'Hide', | ||
attr: { | ||
attr: { | ||
'aria-pressed': 'true', | ||
title: 'Hide Password' | ||
title: 'Hide Password' | ||
} | ||
@@ -181,3 +186,3 @@ } | ||
content: 'Show', | ||
attr: { | ||
attr: { | ||
'aria-pressed': 'false', | ||
@@ -281,2 +286,5 @@ title: 'Show Password' | ||
.removeClass(this.otherState().className); | ||
if (this.options.triggerOnToggle) { | ||
this.element.trigger(this.options.triggerOnToggle, [ this ]); | ||
} | ||
this.updateToggle(); | ||
@@ -283,0 +291,0 @@ return true; |
{ | ||
"name": "hideshowpassword", | ||
"version": "2.0.10", | ||
"version": "2.1.0", | ||
"description": "Easily reveal or hide password field contents via JavaScript or a nifty inner toggle button. Supports touch quite nicely!", | ||
"main": "hideShowPassword.js", | ||
"scripts": { | ||
"minify": "uglifyjs hideShowPassword.js -o hideShowPassword.min.js" | ||
"minify": "uglifyjs hideShowPassword.js -o hideShowPassword.min.js", | ||
"update:bower": "cp package.json bower.json" | ||
}, | ||
@@ -9,0 +10,0 @@ "repository": { |
@@ -163,2 +163,7 @@ # hideShowPassword | ||
// Event to trigger whenever the element is toggled. | ||
// For example, if 'focus' it will focus the cursor in the | ||
// input element after toggling. | ||
triggerOnToggle: false, | ||
// Class to add to input element when the plugin is enabled. | ||
@@ -330,2 +335,4 @@ className: 'hideShowPassword-field', | ||
* **2.1.0**: Add `triggerOnToggle` feature ([#56](https://github.com/cloudfour/hideShowPassword/pull/56)) | ||
* **2.0.11**: Fix for Bower install on Windows ([#44](https://github.com/cloudfour/hideShowPassword/issues/44)) | ||
* **2.0.10**: Update Modernizr test ([#42](https://github.com/cloudfour/hideShowPassword/issues/42)) | ||
@@ -332,0 +339,0 @@ * **2.0.9**: Add `title` attributes to toggle by default ([#41](https://github.com/cloudfour/hideShowPassword/pull/41)) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
360
48594
11
695