.translateAttr

v1.18.x
barisusakli 9 years ago
parent bb6a3f3a52
commit 5983235875

@ -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() {
var el = $(this);

Loading…
Cancel
Save