Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

This minor change fixes an issue when using Prototype 1.7 #55

Merged
merged 1 commit into from

2 participants

@sfsekaran
  • This does not break Prototype 1.6 functionality, afaik.

I was getting a "no method named 'first'" error, but since it's an array, we can simply use the [0] operation to get the first element.

@sfsekaran sfsekaran This minor change fixes an issue when using Prototype 1.7.
* This does not break Prototype 1.6 functionality, afaik.
ebcbd1b
@tdreyno tdreyno merged commit ae47bb8 into tdreyno:master
@tdreyno
Owner

Thanks.

@sfsekaran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 12, 2012
  1. @sfsekaran

    This minor change fixes an issue when using Prototype 1.7.

    sfsekaran authored
    * This does not break Prototype 1.6 functionality, afaik.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  prototype/iphone-style-checkboxes.js
View
2  prototype/iphone-style-checkboxes.js
@@ -54,7 +54,7 @@ var iPhoneStyle = function(selector_or_elems, options) {
elem.change = function() {
var is_onstate = elem.checked;
- var p = handle.positionedOffset().first() / rightside;
+ var p = handle.positionedOffset()[0] / rightside;
new Effect.Tween(null, p, Number(is_onstate), { duration: options.duration / 1000 }, function(p) {
handle.setStyle({ left: p * rightside + 'px' });
onlabel.setStyle({ width: p * rightside + 4 + 'px' });
Something went wrong with that request. Please try again.