Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://api.jquery.com/addClass/" rel="nofollow">jQuery.addClass</a> doesn't support finish callback (as opposed to <code>fadeIn</code> or <code>fadeOut</code>) like you apparently think. Meaning code like: <code>$(body).addClass('example', function() {...})</code> won't run the function once the class is added. The class is added instantly. Documentation states that function may be passed to <code>addClass</code> but it is expected of it to return string that will be added as class name.</p> <p><strong>As a fix</strong>, replace parts when you pass function to addClass with something like:</p> <pre><code>$(settings.listItem).addClass(settings.listStyleTwo).fadeIn(settings.fadeSpeed); </code></pre> <p>Edit: Hah, there was much more to this question than I originally thougth. </p> <p>I checked, and the reason behind the difference (of version with jQueryUI vs without it) is actually implementation of addClass function. With regular (plain) jQuery, the situation with addClass is as I described above, whereas with jQueryUI it is quite different. <a href="http://api.jqueryui.com/addClass/" rel="nofollow">As described here</a>, jQueryUI overrides addClass function and enables it to animate transition between state without and with given class name. That's why after attaching jQueryUI you get smoother animation, because you don't only animate with fadeIn/Out but also animate state by simply using <code>addClass</code> with callback.</p> <p>So to sum up. If you want to get rid of jQueryUI stick to code I pasted above. If you want smoother animation, embed jQueryUI. If your concern with jQueryUI is its size, create yourself custom download and pick just a part which gives you new version of addClass function (so presumably the core will suffice).</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.
    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