Sha256: 461959afdc34f52d58d93e8147ae4c54f5a2d29f64799571ed15590c1507eac3

Contents?: true

Size: 586 Bytes

Versions: 15

Compression:

Stored size: 586 Bytes

Contents

var WhowishWordAttributeHandler = WhowishWordContentHandler.extend({
	
  init: function(elem,attributeName){
    this.elementId = elem.id;
	this.attributeName = attributeName;
  },
  
  setContent: function(content){
  	
	var elem = $w('#' + this.elementId)[0];
	
	try {
		elem[this.attributeName] = content;
	} catch(e) {}
	
	try {
		elem.attributes[this.attributeName].value = content;
	} catch (e) {}
	
	$w(elem).attr(this.attributeName, content);
  },
  
  getContent: function(){
  	var elem = $w('#' + this.elementId)[0];
    return $w(elem).attr(this.attributeName);
	
  }
  
});

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
whowish_word-0.5.2 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.5.1 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.5.0 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.4.0 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.3.3 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.3.2 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.3.1 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.3.0 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.2.7 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.2.6 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.2.5 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.2.3 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.2.2 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.2.1 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.2.0 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js