Unified way to change elements values

Unified way to change elements values

Hi guys,

My problem here is quite simple:
I have a wrapped set of elements, and I would like to change the value of each one of them.
Take a look here:
  1. init : function() {
  2. $('[data-role="page"]').live('pagebeforecreate', function(e) {
  3. var page = $(e.target);
  4. Localization.localize(page.find('[i18n]'));
  5. });
  6. },

  7. localize : function (page) {
  8.      page.each(function(){
  9.          elem = $(this);
  10.           elem.val("My Test");
  11. });




Is there a unified way to change the value of an element without considering its type?
e.g.: 
I can change the button element using val("new value"),  but that won't work on other types, such as headers (the innerHTML value will stay the same)

Thanks in advance,
Alon