Comments (7)
I see a use case for that, when bind.js is used in a larger application, but you could still set the value programmatically in your example:
Instead of $('.name').val('tyler');
you use names.name = 'tyler';
instead.
from bind.js.
@remy - calling trigger('change')
doesn't appear to, no.
from bind.js.
Not sure I follow - the subject suggests there's a problem with input[type=hidden]
, but there isn't one...
from bind.js.
@remy my apologies - fixed the title, forgot to save.
Re: the jsfiddle above - wondering what I'm doing wrong or if this functionality is not implemented. I've got a few places where the input values are modified via jQuery et el but not seeing the binding update (no callback fired when changed etc).
Cheers!
-t
from bind.js.
Oh, I think I follow now. Are you expecting the bound object to update when you change the input using jQuery?
If that's the case, I'm pretty sure you want to trigger a change event on the input element, since that's how bind.js is picking up the change.
$('input.name').val('tyler').trigger('change');
from bind.js.
@twanlass did that work?
from bind.js.
trigger('change')
doesn't do the trick, any ideas?
from bind.js.
Related Issues (20)
- Cleanup method so event listeners are all cleared HOT 3
- Karma tests on remote shell (Cloud9) HOT 3
- Data binding on `select` element HOT 9
- Is there any way of two-way binding on ContentEditable div's? HOT 2
- Modifications over dom
- Use MutationObserver for DOM to object binding
- Bind to attribute
- Interesting bug HOT 1
- Binding to an existing select wipes out options... HOT 5
- Pushing a new item in array doesn't 'watch' children property
- Table Example HOT 1
- Different transformations per target HOT 3
- Min file not updated for release HOT 1
- API to dynamically add and remove bindings HOT 1
- Calculator Example HOT 1
- Is there any way to init Bind automatically from UI Input at page loaded.
- browser support ? HOT 1
- The automated release is failing 🚨 HOT 1
- Selects don't work in v1.1.2 HOT 2
- Recommendation: Add index to array transform HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bind.js.