cameronmcefee / plax

JQuery powered parallaxing

Home Page:http://www.cameronmcefee.com/plax

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error using plax with bonzo via ender

stephenhandley opened this issue · comments

there seems to be a conflict with plax and bonzo:

when running with the following ender build

ender-js backbone qwery bonzo bean domready bowser ender-bootstrap ender-json browser-request morpheus plax

on page load i get:

TypeError: 'undefined' is not an object (evaluating 'el.style.position')

seems to raise a conflict within bonzo's dim function (line #8 below):

 , dim: function () {
          if (!this.length) return { height: 0, width: 0 }
          var el = this[0]
            , orig = !el.offsetWidth && !el.offsetHeight ?
               // el isn't visible, can't be measured properly, so fix that
               function (t, s) {
                  s = {
                      position: el.style.position || ''
                    , visibility: el.style.visibility || ''
                    , display: el.style.display || ''
                  }
                  t.first().css({
                      position: 'absolute'
                    , visibility: 'hidden'
                    , display: 'block'
                  })
                  return s
                }(this) : null
            , width = el.offsetWidth
            , height = el.offsetHeight

          orig && this.first().css(orig)
          return {
              height: height
            , width: width
          }
        }

@ded this might be more your ballgame.