Comments (2)
Since Tooltipster is built on one of the most recommended plugin structures (http://jqueryboilerplate.com/), using the exact same method that qTip uses won't be possible. One of the biggest benefits to the way Tooltipster is set up is the ability to change options on only one specific tooltip. A unique Tooltipster object is attached to each element with its own set of options. So in order to change multiple properties of all your tooltips at once, this is how you'd need to do it:
$('.tooltip').each(function() {
var currentOptions = $(this).data('plugin_tooltipster').options;
$(this).data('plugin_tooltipster').options = $.extend(true, {}, currentOptions, {
position: 'bottom',
speed: 1000
});
});
Or if you wish to change multiple options on just one tooltip:
var currentOptions = $('#my-tooltip').data('plugin_tooltipster').options;
$('#my-tooltip').data('plugin_tooltipster').options = $.extend(true, {}, currentOptions, {
position: 'bottom',
speed: 1000
});
It is slightly more code - but the benefit of being able to change just one tooltip without affecting the other tooltips makes it worth it.
from tooltipster.
Thank-you! It's not a problem. I'm just using jQuery .extend()
to keep different "sets" of options and then I combine them as needed.
var ttvDef = {
trigger: 'custom',
onlyOne: false,
animation: 'grow'
},
ttvOpt1 = {
position: 'top'
},
ttvOpt2 = {
position: 'bottom',
offsetX: 110
};
$.extend(ttvOpt1, ttvDef);
$('input[name_="name"]').tooltipster(ttvOpt1);
$.extend(ttvOpt2, ttvDef);
$('input[name_="email"]').tooltipster(ttvOpt2);
from tooltipster.
Related Issues (20)
- bind jquery data table to tooltipster HOT 1
- Delay In and Delay Out HOT 1
- Refresh page add child class to parent in production HOT 1
- Hyperlinks issue
- Scrollbar is outside the tooltip window
- Add options for tooltipster to maintain content in instance of hiding or closing HOT 1
- Interactive Tooltip with delay 0 not working HOT 2
- Possible false positive detection as malicious script by BitDefender?!
- Can't find the right files
- Not able to resize the tooltip properly when resizing the browser window
- How to remove vertical scroll from tooltip ?
- active development
- Downloaded tooltipster did not contain /tooltipster.css HOT 1
- When I put an overflow-х hidden on the body, the tooltipster block starts to move up along with the content creating a parallax effect. How to fix it?
- onlyOne is not working
- CKEditor support or plugin?
- Tooltipped children of tooltipped parents HOT 1
- The tooltip on IOS requires two clicks to open.
- Tooltips collapse en Firefox
- jQuery 3.5.1 support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tooltipster.