hi
i write below code for filter textfield and textarea in part of my form , that code is as follow as
in this code i filter wraped set to textfield and add textarea how i can make list of textfield and textarea without need to add textarea later . my meaning is that writing textfield and textarea together in filter method
thanks alot for your help.
i write below code for filter textfield and textarea in part of my form , that code is as follow as
Code:
(function($){
$.fn.setReadOnly = function(readonly, opacityRo, opacityNRo) {
if(!opacityNRo) {
opacityNRo = 1;
}
if(!opacityRo) {
opacityRo = 0.5;
}
if(opacityRo<=100 && opacityRo>1) {opacityRo /= 100;}
if(opacityNRo<=100 && opacityNRo>1) {opacityNRo /= 100;}
return this.filter('input:text').add('textarea')
.attr('readonly',readonly)
.css('opacity', readonly ? opacityRo : opacityNRo);
}
})(jQuery);
thanks alot for your help.
Comment