mirror of
https://github.com/Doodle3D/doodle3d-connect.git
synced 2024-11-05 15:13:23 +01:00
17 lines
423 B
JavaScript
17 lines
423 B
JavaScript
|
(function($){
|
||
|
$.fn.extend({
|
||
|
psswrd: function() {
|
||
|
return $(this).each(function(){
|
||
|
console.log(" each: ",$(this));
|
||
|
var $input = $(this);
|
||
|
var $checkbox = $($input.data('typetoggle'));
|
||
|
|
||
|
$checkbox.change(updateType);
|
||
|
updateType();
|
||
|
function updateType() {
|
||
|
$input[0].type = $checkbox.is(':checked') ? 'text' : 'password';
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
})(jQuery);
|