[wp-trac] [WordPress Trac] #10426: Should introduce JavaScript hooks/events/callback after a widget has been added from the admin interface

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 16 23:21:35 UTC 2009


#10426: Should introduce JavaScript hooks/events/callback after a widget has been
added from the admin interface
------------------------------------------------------------------------+---
 Reporter:  godfreykfc                                                  |        Owner:  azaozz 
     Type:  enhancement                                                 |       Status:  closed 
 Priority:  normal                                                      |    Milestone:         
Component:  JavaScript                                                  |      Version:         
 Severity:  normal                                                      |   Resolution:  wontfix
 Keywords:  close widgets, javascript, admin, events, hooks, callbacks  |  
------------------------------------------------------------------------+---

Comment(by Denis-de-Bernardy):

 Expanding on andrew's comment, the livequery approach has worked fine
 since 2.5. there was a slight issue with 2.8, since jquery got upgraded,
 and livequery needed version 1.1 which is still in beta (so needs to be
 checked out from CVS). But it totally works.

 Things end up looking like this:

 {{{
 jQuery(document).ready(function(){
         jQuery("div.nav_menu_item_sortables").livequery(function() {
                 // do stuff
         });
         jQuery("input.nav_menu_item_add").livequery('click', function() {
                 // do stuff
         });
 });
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10426#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list