-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Allow adding html elements as tooltip content #983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ docs | |
*.patch | ||
.DS_Store | ||
.settings | ||
*.sw? | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,32 @@ test( "content: string", function() { | |
}).tooltip( "open" ); | ||
}); | ||
|
||
test( "content: element", function() { | ||
expect( 1 ); | ||
var content = "<p>This is a <i>test</i> of the emergency broadcast system.</p>" | ||
var element = $( content )[ 0 ]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Too many var statements. |
||
$( "#tooltipped1" ).tooltip({ | ||
content: element, | ||
open: function( event, ui ) { | ||
// Getting just the contents of the tooltip wrapper. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this comment. |
||
equal( ui.tooltip[ 0 ].firstChild.innerHTML, content ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comparison looks questionable. Not sure about a better way to test this. Maybe |
||
} | ||
}).tooltip( "open" ); | ||
}); | ||
|
||
test( "content: jQuery", function() { | ||
expect( 1 ); | ||
var content = "<p>This is a <i>test</i> of the emergency broadcast system.</p>" | ||
var element = $( content ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Too may var statements. |
||
$( "#tooltipped1" ).tooltip({ | ||
content: element, | ||
open: function( event, ui ) { | ||
console.log( ui.tooltip ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this. |
||
equal( ui.tooltip[ 0 ].firstChild.innerHTML, content ); | ||
} | ||
}).tooltip( "open" ); | ||
}); | ||
|
||
test( "items", function() { | ||
expect( 2 ); | ||
var event, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add this to your global gitignore via
core.excludesfile
. I actually didn't realize we had so many files in here, I'm going to rip these out :-PThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this.