Changes between Initial Version and Version 2 of Ticket #7103


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

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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7103

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

    initial v2  
    22
    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.
    4 
    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.
    6 
    7 Got most of these changes in and you can look at the branch here: https://github.com/gnarf37/jquery-ui/compare/effects-api...effects-sub  -- 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...