Skip to content

Commit

Permalink
Fix issue [#47]
Browse files Browse the repository at this point in the history
  • Loading branch information
kallookoo committed Jan 11, 2022
1 parent 9f6c7cb commit 02fbef7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ For testing download or clone [wp-color-picker-alpha-plugin](https://github.com/


## Changelog
###### v3.0.2
* Issue [#47](../../issues/47)

###### v3.0.1
* Issue [#46](../../issues/46)

Expand Down
4 changes: 2 additions & 2 deletions dist/wp-color-picker-alpha.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/wp-color-picker-alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
* Only run in input and is defined data alpha in true
*
* Version: 3.0.1
* Version: 3.0.2
* https://github.com/kallookoo/wp-color-picker-alpha
* Licensed under the GPLv2 license or later.
*/

( function( $, undef ) {

var wpColorPickerAlpha = {
'version' : 300
'version' : 302
};

// Always try to use the last version of this script.
Expand Down Expand Up @@ -542,7 +542,7 @@
self.colorAlpha.css( { 'background-color': ui.color.to_s( self.alphaOptions.alphaColorType ) } );

// fire change callback if we have one
if ( $.isFunction( self.options.change ) ) {
if ( typeof self.options.change === 'function' ) {
self.options.change.call( this, event, ui );
}
}
Expand Down Expand Up @@ -585,7 +585,7 @@
*
* @return {void}
*/
el.change( function( event ) {
el.on( 'change', function( event ) {
var val = $( this ).val();

if ( el.hasClass( 'iris-error' ) || val === '' || val.match( /^(#|(rgb|hsl)a?)$/ ) ) {
Expand All @@ -596,7 +596,7 @@
self.colorAlpha.css( 'background-color', '' );

// fire clear callback if we have one
if ( $.isFunction( self.options.clear ) ) {
if ( typeof self.options.clear === 'function' ) {
self.options.clear.call( this, event );
}
}
Expand All @@ -623,7 +623,7 @@
self.colorAlpha.css( 'background-color', '' );

// fire clear callback if we have one
if ( $.isFunction( self.options.clear ) ) {
if ( typeof self.options.clear === 'function' ) {
self.options.clear.call( this, event );
}

Expand All @@ -632,4 +632,4 @@
} );
},
} );
} ( jQuery ) );
} )( jQuery );

0 comments on commit 02fbef7

Please sign in to comment.