Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery setting 'onmouseover' attr doesn't seem to work?
    text
    copied!<p>I seem to be unable to change the onmouseover attribute of a div using jquery. In the code below, lines 1 and 3 work fine but line 2 does nothing.</p> <pre><code>window.parent.$('#note' + appid + dbid).html('&lt;img src="images/note_gray.png"&gt;'); window.parent.$('#note' + appid + dbid).attr('onmouseover','testestestsetset'); window.parent.$('#note' + appid + dbid).attr('title', 'testdata'); </code></pre> <p>Using Chrome (13.0.772.0 dev-m) watching the developer tools. I see the two changes immediately as I should, the onmouseover never does anything.</p> <p>The .net code uses onmouseover to do some weird javascript hover thing. I don't want to go back and change all that functionality, so when I update a record I want it to change the hover tip to reflect the new data, without doing a page postback. This is why I am using onmouseover and trying to change it from jquery so please don't ask "Why don't you use x instead". Thanks.</p> <p>---EDIT----</p> <p>If it helps, this is what it looks like in HTML from the generated page that I am building edit functionality for. The original code uses a javascript function called "Tip" to generate a hovertip. This was written by someone else. I am doing edit modals for the page. When you submit a change, I want it to change the tooltip.</p> <pre><code>&lt;div id="note1009872" class="dbnote" onmouseover="Tip('No Notes...')" onmouseout="UnTip()" title="testempty"&gt;&lt;img src="images/note.png"&gt;&lt;/div&gt; </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