UNPKG

jqwidgets-scripts-custom

Version:

jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.

78 lines (65 loc) 2.97 kB
<!DOCTYPE html> <html lang="en"> <head> <title id='Description'>Tooltip Custom Element CloseOnClick</title> <meta name="description" content="This is an example of close on click in Tooltip Custom Element." /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> <link rel="stylesheet" href="../../../jqwidgets/styles/jqx.base.css" type="text/css" /> <link rel="stylesheet" href="../../../styles/demos.css" type="text/css" /> <script type="text/javascript" src="../../../scripts/webcomponents-lite.min.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxcore.elements.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxtooltip.js"></script> <script type="text/javascript" src="../../../scripts/demos.js"></script> <script type="text/javascript"> JQXElements.settings['tooltip1Settings'] = { content: 'The Amazing Spider-man', position: 'bottom', selector: 'filmPicture1', autoHideDelay: 6000, autoHide: false }; JQXElements.settings['tooltip2Settings'] = { content: 'Harry Potter and the Deathly Hallows', position: 'bottom', selector: 'filmPicture2', autoHideDelay: 6000, autoHide: false }; JQXElements.settings['tooltip3Settings'] = { content: 'The Avengers', position: 'bottom', selector: 'filmPicture3', autoHideDelay: 6000, autoHide: false }; </script> <style> #container { width: 400px; margin-left: 180px; } jqx-tool-tip{ width: 150px; } </style> </head> <body> <div class="example-description"> In this sample, the Tooltip Custom Element's "autoHide" property is set to false. When "autoHide" is off, to close a tooltip, you will have to click it or to open another tooltip that have identical name. </div> <div id="container"> <img style="margin: 8px;" src="../../../images/The_Amazng_Spider_Man.jpeg" id="filmPicture1" /> <jqx-tool-tip settings="tooltip1Settings"></jqx-tool-tip> <img style="margin: 8px;" src="../../../images/Harry_Potter_7_Part_1.jpg" id="filmPicture2" /> <jqx-tool-tip settings="tooltip2Settings"></jqx-tool-tip> <img style="margin: 8px;" src="../../../images/The_Avengers.jpg" id="filmPicture3" /> <jqx-tool-tip settings="tooltip3Settings"></jqx-tool-tip> </div> </body> </html>