Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure affix target element #13342

Closed
wants to merge 7 commits into from
Closed

Configure affix target element #13342

wants to merge 7 commits into from

Conversation

adobi
Copy link
Contributor

@adobi adobi commented Apr 15, 2014

No description provided.

@cvrebert
Copy link
Collaborator

Please also include a docs update to mention this new parameter.

this.$window = $(window)
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
this.$window = this.options.target ? $(this.options.target) : $(window)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think $(window) might make more sense added to affix's defaults… rather then doing this check here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also this.$window doesn't make much sense if the target isn't the window… should probably rename that to this.$target

@cvrebert cvrebert added this to the v3.2.0 milestone Apr 16, 2014
@cvrebert
Copy link
Collaborator

cvrebert commented May 1, 2014

/cc @fat for final review since the requested changes have been made.

.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))

this.$target = $(this.options.target)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you dont need this var definition to be a separate line

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look how $window was done above for ref

@cvrebert
Copy link
Collaborator

Running Sauce tests on a squashed version of this PR: https://travis-ci.org/twbs/bootstrap/jobs/25362457

@cvrebert
Copy link
Collaborator

Sauce tests passed.
Merging since all of @fat's feedback has been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants