wintercounter / Protip

A new generation jQuery Tooltip plugin
http://protip.rocks
MIT License
359 stars 38 forks source link

Have max-width property on main config #13

Closed skitterm closed 8 years ago

skitterm commented 8 years ago

It'd be nice if you could set a max-width for all of your tooltips at config time instead of having to specify each one individually.

wintercounter commented 8 years ago

True, making all default options configurable easily soon. I don't know how I forgot such thing. Thanks for the tip.

wintercounter commented 8 years ago

Now you can set every default values at initialization. Example:

$.protip({
    defaults: {
        width: 200,
        position: 'bottom'
    }
})

See docs for further info. Please note this is a breaking change as i had to remove animation, scheme, size and skin properties from the config object as from now on these should be set through the defaults property also. I've raised version number according to this.

pappfer commented 8 years ago

FYI: the CDN version seems to be older, it doesn't support this functionality yet. //cdn.rawgit.com/DoclerLabs/Protip/master/protip.min.js

wintercounter commented 8 years ago

Thanks for the notice. I've change to min.gitcdn.xyz every assets. Rawgit caches once only...

wintercounter commented 8 years ago

Weird, seems like they having an issue serving a CSS file. I've opened an issue for them and I'll search for another solution if it won't be handled in 1-2 hours.