Sha256: a81be9dee5c026c973c6ba3b00094d9a393b69c5cbae43ebb5d31c41155b6d8b

Contents?: true

Size: 587 Bytes

Versions: 11

Compression:

Stored size: 587 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

11 entries across 11 versions & 1 rubygems

Version Path
whowish_word-1.0.0 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.6.5 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.6.4 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.6.3 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.6.2 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.6.2gem lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.6.1 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.6.0 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.5.5 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.5.4 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.5.3 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js