Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to bind single functionality for multiple div id
    primarykey
    data
    text
    <p>I want to use tool tip for large number of lists</p> <p>I wrote a jquery for every div, but i dont know to bind a functionality for multiple div items</p> <p>Here is the link <a href="http://masterssoftware.in/tool_tip2.html" rel="nofollow">http://masterssoftware.in/tool_tip2.html</a> and below the mentioned code</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function(){ $("#a1_down").hover(function(){ $("#tip1_down").toggle(); }); $("#a2_down").hover(function(){ $("#tip2_down").toggle(); }); $("#a3_down").hover(function(){ $("#tip3_down").toggle(); }); }); &lt;/script&gt; &lt;style&gt; body{ background:#690;} .tip{ width:500px; height:100px; padding:10px; background:#CFF; display:none; overflow:hidden; border-radius:5px 5px 5px 5px; z-index:200; position:absolute;} .tip h4{ display:block; font-size:18px; text-transform:uppercase;} .tip p{ font-size:14px;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;ul&gt; &lt;li&gt;&lt;a id="a1_down" href="#"&gt;aaaaaaaaaaa&lt;/a&gt;&lt;/li&gt; &lt;div id="tip1_down" class="tip"&gt; &lt;h4&gt;content of aaaaaaaa aaaaaaaaaaaaaa &lt;/h4&gt; &lt;p&gt;content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa&lt;/p&gt; &lt;/div&gt; &lt;li&gt;&lt;a id="a2_down" href="#"&gt;aaaaaaaaaaa&lt;/a&gt;&lt;/li&gt; &lt;div id="tip2_down" class="tip"&gt; &lt;h4&gt;content of aaaaaaaa aaaaaaaaaaaaaa &lt;/h4&gt; &lt;p&gt;content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa&lt;/p&gt; &lt;/div&gt; &lt;li&gt;&lt;a id="a3_down" href="#"&gt;aaaaaaaaaaa&lt;/a&gt;&lt;/li&gt; &lt;div id="tip3_down" class="tip"&gt; &lt;h4&gt;content of aaaaaaaa aaaaaaaaaaaaaa &lt;/h4&gt; &lt;p&gt;content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa content of aaaaaaaa aaaaaaaaaaaaaa&lt;/p&gt; &lt;/div&gt; &lt;/ul&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload