Note that there are some explanatory texts on larger screens.

plurals
  1. PODoes IE fail when removing tag attribs with jquery?
    primarykey
    data
    text
    <p>I´m using an different box for title atrib in elements. I´ve developed a simple jQuery stuff to do it but... the "best friend ever", IE, don´t work correctly. It´s simple don´t remove the title atrib as the other browsers do. The result: i´ve the box showing the title atrib and the own browser box over this. How can i resolve this? (code next). NOTE: works on Chrome, Safari, Firefox, Opera. But IE don´t.</p> <pre><code>&lt;title&gt;Box&lt;/title&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt; &lt;style type="text/css"&gt; #dbox { background: #003767; padding: 5px 8px; position: absolute; margin: 20px; color: white; font-size: 14px; display: inline; /* border radius specif browsers */ -webkit-border-radius: 3px; /* safari, chrome */ -khtml-border-radius: 3px; /* ktml browsers */ -moz-border-radius: 3px; /* firefox, mozila found. */ -o-border-radius: 3px; /* opera, opmob */ } &lt;/style&gt; &lt;script type="text/javascript" src="js/jquery-1.5.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var dbox_time = 120; var delay_time = 500; $(document).ready(function(){ $('&lt;div id="dbox"&gt;&lt;/div&gt;').insertAfter(('body')); $("[title != '']").each(function() { $(this).addClass('lkBox'); $(this).css({border: '1px solid red'}); }); $('#dbox').empty(); $('#dbox').css({ display: 'none', opacity: '0' }) $(document).mousemove(function(e){ $('#dbox').css({ 'left': e.pageX, 'top' : e.pageY }) }) $('.lkBox').mouseover(function(){ $('#dbox').text($(this).attr('title')); $('#dbox').css({display: 'block'}) .stop().animate({opacity: '1'}, dbox_time) }) $('.lkBox').mouseout(function(){ $(this).attr('title', $('#dbox').text()); $('#dbox').css({display: 'none'}) .stop().animate({ opacity: '0' }, dbox_time) }) }) &lt;/script&gt; </code></pre> <p>Body:</p> <pre><code>&lt;div style="float: left; width: 70%; padding: 50px;"&gt; &lt;h1&gt;Examples: (mouse over the links)&lt;/h1&gt; &lt;p&gt;Curabitur lacus tortor, pellentesque eget &lt;a href="#"&gt;interdum in&lt;/a&gt;, auctor et lorem. In in quam lorem, vel &lt;a href="#" title="i´m am a title =). must show"&gt;sagittis lec&lt;/a&gt;. Donec felis leo, id fermentum nibh porttitor. Vestibulum ante &lt;a href="#" title=""&gt;empy title (dont need to work)&lt;span&gt;&lt;/span&gt;&lt;/a&gt; primis. Lorem ipsum dolor sit amet, &lt;a href="#" title="another title to show"&gt;lorem ipsum&lt;/a&gt; elit.&lt;/p&gt; &lt;/div&gt; </code></pre> <p>INFO: if an alert is placed after</p> <pre><code>$(this).attr('title', $('#dbox').text()); </code></pre> <p>it work on IE.. but i can´t use an alert.</p>
    singulars
    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.
 

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