PDA

View Full Version : Resolved Re-writing a jQuery tooltip plugin



FrickenTrevor
01-19-2015, 03:41 AM
In one of my projects im using this tooltip plugin called aToolTip [GitHub] (https://github.com/ItsMeAra/aToolTip).

It's great however I do not want to have to call the plugin by adding



class="fixedTip"


to every single link in the page. It should be called using something like this:



<script>
$(function(){
$('document.body').aToolTip({
fixed: true
});
});
</script>
....
<a href="#" title="Hello, I am aToolTip">Normal Tooltip</a>

Beverleyh
01-19-2015, 10:27 AM
This will apply the tooltip to all <a> tags that have a title attribute.
<script type="text/javascript">
$(function(){
$('a').aToolTip({
fixed: true
});
});
</script>

FrickenTrevor
01-20-2015, 02:44 AM
This will apply the tooltip to all <a> tags that have a title attribute.
<script type="text/javascript">
$(function(){
$('a').aToolTip({
fixed: true
});
});
</script>

You know I thought that it would be something this simple, and I do feel stupid for not thinking about changing it like that :o
I am so used to plugins that are so hardcoded to where if you change one little thing the entire plugin breaks.