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

Add an appendTo option #127

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add an appendTo option #127

wants to merge 2 commits into from

Conversation

semiaddict
Copy link

Added the option "appendTo" that makes it possible to append the tip to
a specific element. Defaults to "body".

This is useful for situations where the tip should follow the element
such as a slider handler.

Example usage:

$('<div/>') .slider({ animate: true, range: "min", value: 0, min: 0, max: 10, step: 1, create: function(event, ui){ this.handle = $(this).find('.ui-slider-handle'); this.handle.tipsy({ trigger: 'manual', appendTo: this.handle }); }, start: function(event, ui) { this.handle.tipsy('show'); }, stop: function(event, ui) { this.handle.tipsy('hide'); } });

Added the option "appendTo" that makes it possible to append the tip to
a specific element. Defaults to the "body".

This is useful for situations where the tip should follow the element
such as a slider handler.

Example usage:

$('<div/>')
.slider({
animate: true,
range: "min",
value: 0,
min: 0,
max: 10,
step: 1,
create: function(event, ui){
this.handle = $(this).find('.ui-slider-handle');
this.handle.tipsy({
trigger: 'manual',
appendTo: this.handle
});
},
start: function(event, ui) {
this.handle.tipsy('show');
},
stop: function(event, ui) {
this.handle.tipsy('hide');
}
});
@semiaddict
Copy link
Author

Good point Daniel. I made and committed the modification.

@christophertrudel
Copy link

It would seem many of us want support for this. This was my approach.
#150

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

Successfully merging this pull request may close these issues.

3 participants