Skip to content

Commit

Permalink
- more closures
Browse files Browse the repository at this point in the history
- bump
  • Loading branch information
ded committed Jun 9, 2012
1 parent fbe1bf7 commit 8e38b1f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
11 changes: 8 additions & 3 deletions bonzo.js
Expand Up @@ -169,14 +169,19 @@

(ie && html.currentStyle) ?

/**
* @param {Element} el
* @param {string} property
* @return {string|number}
*/
function (el, property) {
if (property == 'opacity') {
var val = 100
try {
val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity
val = el['filters']['DXImageTransform.Microsoft.Alpha'].opacity
} catch (e1) {
try {
val = el.filters('alpha').opacity
val = el['filters']('alpha').opacity
} catch (e2) {}
}
return val / 100
Expand Down Expand Up @@ -290,7 +295,7 @@

/**
* @constructor
* @param {Element|Array.<Element>|string} elements
* @param {Array.<Element>|Element|Node|string} elements
*/
function Bonzo(elements) {
this.length = 0
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "bonzo"
, "description": "Library agnostic, extensible DOM utility"
, "version": "1.0.8"
, "version": "1.0.9"
, "homepage": "https://github.com/ded/bonzo"
, "author": "Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)"
, "contributors": [
Expand Down
11 changes: 8 additions & 3 deletions src/bonzo.js
Expand Up @@ -164,14 +164,19 @@

(ie && html.currentStyle) ?

/**
* @param {Element} el
* @param {string} property
* @return {string|number}
*/
function (el, property) {
if (property == 'opacity') {
var val = 100
try {
val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity
val = el['filters']['DXImageTransform.Microsoft.Alpha'].opacity
} catch (e1) {
try {
val = el.filters('alpha').opacity
val = el['filters']('alpha').opacity
} catch (e2) {}
}
return val / 100
Expand Down Expand Up @@ -285,7 +290,7 @@

/**
* @constructor
* @param {Element|Array.<Element>|string} elements
* @param {Array.<Element>|Element|Node|string} elements
*/
function Bonzo(elements) {
this.length = 0
Expand Down

0 comments on commit 8e38b1f

Please sign in to comment.