how to custom position jquery-ui tooltip for each item
I use default code to apply for all website have tag img or attribute is tootltip and title
- $(document).tooltip({
- track: true,
- items: "img, [tooltip], [title]",
- content: function() {
- var element = $( this );
- if ( element.is("[tooltip]") ) {
- var src = element.attr("tooltip");
- return "<img src='" + src + "' width='100'>";
- }
- if ( element.is( "[title]" ) ) {
- return element.attr( "title" );
- }
- if ( element.is( "img" ) ) {
- return element.attr( "alt" );
- }
- }
- });
but in the some cases, I want to change position for another tag name
Example: with tags that have class="custome" it's will be change another position my and at, converse it's use default position. How to do it?
Sr, my english is not good