Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, here's my solution if anyone is interested.</p> <p>I ended up modifying jQuery's source just a little, and it seems to work well. Then I slipped the changes into the minified version with the necessary tweaks.</p> <p>Here's what I did (for the non-minified):</p> <p>In jQuery's <code>animate:</code> function, in the <code>if()</code> statement that checks for 'height' and 'width', I added the following:</p> <pre><code>// Detect inline-block standard, pre ie8 fix, and pre Firefox 3 fix opt.ibCheck =(jQuery.css(this,'display') === 'inline-block') || (jQuery.css(this,'zoom') !== 'normal' &amp;&amp; jQuery.css(this,'display') === 'inline') || (jQuery.css(this,'display') === '-moz-inline-stack'); </code></pre> <p>Then in <code>jQuery.fx.prototype.update:</code>, in the <code>if()</code> statement that checks for 'height', 'width' and 'this.element.style', I changed that <code>if()</code> statement to the following:</p> <pre><code>if ( ( this.prop === "height" || this.prop === "width" ) &amp;&amp; this.elem.style &amp;&amp; !this.options.ibCheck ) { </code></pre> <p>...checking for the ibCheck property that was set in 'animate'.</p> <p>Everything seems to work well. It checks for inline-block, the common pre-Firefox 3 fix or the pre-ie8 fix. If one is found, it sets ibCheck to 'true'. The <code>update()</code> function will not change the display to 'block' if ibCheck is 'true'.</p> <p>There could be a better check for IE. I suppose if someone animates an 'inline' element, with 'zoom' set to anything besides 'normal', it may cause problems? As for me, I didn't know that IE even accepted a 'zoom' attribute until yesterday!</p>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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