Try It Editor
Tip: Press
Ctrl/⌘ + Enter
to Run
▶ Run
Reset
Copy
Download
Code
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Tooltip content Option</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.min.js"></script> </head> <body> <span id="info" title="placeholder" style="cursor:pointer;text-decoration:underline;">Shipping info</span> <script> $(function(){ $("#info").tooltip({ content: function(){ return "<strong>Note:</strong> Free shipping over $50"; } }); }); </script> </body> </html>
Output