@ -68,6 +68,15 @@ if ('undefined' !== typeof window) {
return translate(this, 'val', str);
};
$.fn.translateAttr = function(attr, str) {
return this.each(function() {
var el = $(this);
translator.translate(str, function(translated) {
el.attr(attr, translated);
});
function translate(elements, type, str) {
return elements.each(function() {