Saturday, 27 October 2012

dijit tooltip example

//dijit tooltip example

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr">
   
    <head>
        <style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>
//importing required css
      <link rel="stylesheet" href="<%=request.getContextPath() + "/dojo1.4.3/dijit/themes/tundra/tundra.css"%>" />
       
       <script language="JavaScript" src="<%=request.getContextPath() +"/dojo1.4.3/dojo/dojo.js"%>" djconfig="parseOnLoad:true"></script>  //making parse on load true 
        <script>
            dojo.require("dijit.Tooltip");
            dojo.addOnLoad(function() {
                // create a new Tooltip and connect it to tooltipId
                new dijit.Tooltip({
                    connectId: ["tooltipId"],//to which dom id tool tip should connect
                    label: "<b>dijit toolTip example</b>" //this content will be displayed in tool tip
                });
       
            });
        </script>       
    </head>
   
    <body class="tundra">
        <span id="tooltipId" >
            Hover over this text
        </span>
     
    </body>

</html>

output:-

No comments:

Post a Comment

Custom single threaded java server

 package com.diffengine.csv; import java.io.*; import java.net.*; import java.util.Date; public class Server { public static void main(Str...