Giter Site home page Giter Site logo

Comments (7)

AVGP avatar AVGP commented on September 28, 2024 1

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.

twanlass avatar twanlass commented on September 28, 2024 1

@remy - calling trigger('change') doesn't appear to, no.

from bind.js.

remy avatar remy commented on September 28, 2024

Not sure I follow - the subject suggests there's a problem with input[type=hidden], but there isn't one...

from bind.js.

twanlass avatar twanlass commented on September 28, 2024

@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.

remy avatar remy commented on September 28, 2024

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.

remy avatar remy commented on September 28, 2024

@twanlass did that work?

from bind.js.

adelriosantiago avatar adelriosantiago commented on September 28, 2024

trigger('change') doesn't do the trick, any ideas?

from bind.js.

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.