Another newbie question. I had a question about creating a tooltip on focus, which works. The solution leads me to something like this:
$("input[id$=tbMyTextbox]").qtip({
content: 'Test',
position: {
corner: {
target: 'rightMiddle',
tooltip: 'leftMiddle'
}
},
show: {
when: {
event: 'focus'
}
},
hide: {
when: {
event: 'blur'
}
}
});
While that works, I need to implement many tooltips, and each time I only need to change the Selector and content-Attribute, while everything else is the same.
Is there a generic way in jQuery to put settings in a common place? Kinda like subclassing.
I'm not interested in any server-side solution of generating the jQuery code in a loop (due to a) some technical limitations and b) my desire to learn jQuery).