Sha256: 25c6629d36362d50360dd3a744f68d44ad7baa6d18d02cd1e5600519515b34d2

Contents?: true

Size: 918 Bytes

Versions: 3

Compression:

Stored size: 918 Bytes

Contents

if (Element.implement) {
  Element.implement({
    hasElement: function(tag){
      return (tag == undefined) ? (this.getChildren().length > 0) : (this.getElement(tag) != null)
    },
    hasElements: function(tag){
      return (tag == undefined) ? (this.getChildren().length > 0) : (this.getElements(tag).length > 1)
    },
    hasEvent: function(eventType, fn){
      var myEvents = this.retrieve('events')
      return myEvents && myEvents[eventType] && (fn == undefined || myEvents[eventType].keys.contains(fn))
    },
    hasParent: function(tag){
      return (tag == undefined) ? (this.getParent().length > 0) : (this.getParent(tag) != null)
    },
    disable: function(){
      this.set('disabled', true)
      return this
    },
    enable: function(){
      this.set('disabled', false)
      return this
    }
  })
}
else {
  if (console && console.error) console.error('Mootools is not yet installed.')
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mootools-plus-0.1.1 vendor/assets/javascripts/mootools-plus/element.js
mootools-plus-0.1.0 vendor/assets/javascripts/mootools-plus/element.js
mootools-plus-0.0.3 vendor/assets/javascripts/mootools-plus/element.js