Changes between Initial Version and Version 2 of Ticket #7103

Mar 11, 2011, 10:03:41 AM (12 years ago)
Corey Frang

Moving jQuery.sub() to another ticket per scotts request - leaving only $.effects.effect[] on this ticket: contains the other part...


  • Ticket #7103

    • Property Priority changed from minor to major
  • Ticket #7103 – Description

    initial v2  
    33In thinking about how to handle the BC shim for this API change, and other ways we might clean up the internal API - I thought we could move the actual effect implementation functions out of the {{{ $.effects[] }}} and into {{{ $.effects.effect[] }}}.  It gives us a discreet namespace where we are sure that the function is an effect API function.  Currently, other functions exist out on {{{ $.effects[] }}} that aren't effects, allowing you to get interesting results for {{{ $("div").toggle("animateClass") }}} - Letting that namespace hold utility functions, while pushing the actual effects into a new namespace could show some minor improvements.
    5 Also - We could potentially leverage {{{ $.effects.$ = jQuery.sub() }}} and extend its {{{fn}}} to serve up the setMode, save, restore, createWrapper, removeWrapper, and a few other helper functions that all take {{{ el }}} as a first parameter.  Each of the effect functions can then use {{{ $.effects.$( this ) }}} and have all the helper functions available in a nice chain.
    7 Got most of these changes in and you can look at the branch here:  -- it seems github is mistakenly showing some of the whitespace changes that were in the effects-api branch on the effects-sub branch, but you should get the idea...