Below Jquery is working fine but How could I shorten this Jquery? I have to show and hide the password for password and confirmed password? https://jsfiddle.net/c5cvLo54/1/
you can use only one button to control.
```
$('.showOrHide').click(function(e){
var target = e.currentTarget
$(target).hasClass('show')?hidePassword($(target)):showPassword($(target))
})
function hidePassword(e){
e.removeClass('show').addClass('hide')
e.prev('input').attr('type','password')
}
function showPassword(e){
e.removeClass('hide').addClass('show')
e.prev('input').attr('type','text')
}
html:
```
```
style:
```
.show{
/*css you want */
color: blue
}
.hide{
/*css you want */
color: red
}
```