Friday 15 February 2013

d3.js - bootstrap switch d3 on change event -



d3.js - bootstrap switch d3 on change event -

i'm putting d3 visualization makes utilize of bootstrap , bootstrap-switch libraries.

i've got set of switches beingness generated d3 i'd hear can update visualization based on status; i've got event listener on switches it's not doing anything:

d3.selectall(".input").on("change", function() { console.log(this) })

http://jsfiddle.net/jy24dk20/1/

can tell me i'm doing wrong?

bootstrap switch (2.0.1, legacy) fires event called switch-change, per docs.

it appears not alter checked state on input and, hence, not trigger change event.

i recommend listening switch-change event impact changes:

$('input').bootstrapswitch().on("switch-change", function() { console.log(this) })

twitter-bootstrap d3.js event-handling bootstrap-switch

No comments:

Post a Comment