Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy are onclick events inside qtip2 tooltips not working?
    text
    copied!<p>In the jsfiddle link given below, there are 2 buttons and a tooltip is displayed on clicking of any one of them. I want the button inside the tooltip to change the display and other attributes of the "delete" text and "input text"(make the text field editable) The problem is that the value does update but still the text does not become editable" Please suggest a solution to the problem</p> <h3><a href="http://jsfiddle.net/r9yfw/26/" rel="nofollow">JSFIDDLE</a></h3> <h2>HTML</h2> <pre><code>&lt;button id="gear"&gt;Gear&lt;/button&gt; &lt;button id="gear1"&gt;Gear&lt;/button&gt; &lt;div style="display:none;" id="menu"&gt; &lt;button class="menuitem"&gt;Rename&lt;/button&gt;&lt;br&gt; &lt;input type= "text" id = "try" readonly = "true"&gt;&lt;br&gt; &lt;div id = "delete" style = "display: block"&gt;Delete&lt;/div&gt;&lt;br&gt; &lt;/div&gt; </code></pre> <p>​</p> <h2>JavaScript</h2> <pre><code>$(function() { $("#gear").button({ icons: { primary: "ui-icon-gear", secondary: "ui-icon-triangle-1-s" }, text: false }).qtip({ content: { text: $('#menu') }, show: { event: 'click', solo: true, modal: true }, style: { classes: 'ui-tooltip-dark ui-tooltip-shadow' }, position: { my: 'top center', at: 'bottom center', } }); $("#gear1").button({ icons: { primary: "ui-icon-gear", secondary: "ui-icon-triangle-1-s" }, text: false }).qtip({ content: { text: $('#menu') }, show: { event: 'click', solo: true, modal: true }, style: { classes: 'ui-tooltip-dark ui-tooltip-shadow' }, position: { my: 'top center', at: 'bottom center', } }); $(".menuitem").click(function(){ document.getElementbyId("try").readOnly = false; document.getElementbyId("delete").style.display = none; alert($(this).text()); }); });​ </code></pre> <h2>CSS</h2> <pre><code>#gear { margin:100px; } .menuitem { padding-left: 10px; padding-right: 10px; font-size: 9px; margin-bottom: 3px; width: 75px; } </code></pre>
 

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