Coder Social home page Coder Social logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 22, 2024

Original comment by [email protected] on 4 Jul 2009 at 7:45

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from django-ajax-selects.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 22, 2024
A better solution would be to trigger the event after the kill function is 
called so
that the DOM updates.

The best solution would probably be use event handling internally to trigger 
the kill
function.  Not sure what the ramifications of that would be though.

Original comment by [email protected] on 4 Jul 2009 at 10:16

from django-ajax-selects.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 22, 2024
I haven't had time to research what 

.trigger("killed")

does.  is it calling a function or is it some kind of signaling  system ?  what 
is a "killed" event ? (what type of 
object is it?)

thanks

Original comment by [email protected] on 9 Jul 2009 at 3:28

from django-ajax-selects.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 22, 2024
Its a purely arbitrarily named custom event.  From the jQuery docs:

"Triggered events aren't limited to browser-based events, you can also trigger 
custom
events registered with bind."

  -- http://docs.jquery.com/Events/trigger

So that way my custom Javascript can bind to the "killed" event to have a 
callback
function executed whenever an item is removed.

Original comment by [email protected] on 9 Jul 2009 at 5:21

from django-ajax-selects.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 22, 2024
oh good, its a signaling system.  or "dispatch"

ok, I'm all for it.

this order, right:

+                kill_{{html_id}}(num);
+                $("#{{html_id}}_on_deck").trigger("killed");





Original comment by [email protected] on 9 Jul 2009 at 6:29

from django-ajax-selects.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 22, 2024
Right!  I guess since Django has signals I should have used that terminology 
from the
beginning.  Sorry.

That order fits my use case (updating a <select> whenever the selected items 
change),
and I don't see any reason to confuse things with pre & post signals.

So: Yes  :-)

Thanks!

Original comment by [email protected] on 9 Jul 2009 at 6:39

from django-ajax-selects.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 22, 2024
ok, finally committed. just as in comment 5

Original comment by [email protected] on 8 Aug 2009 at 10:50

  • Changed state: Fixed

from django-ajax-selects.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.