BorisMoore / jquery-datalink

A data linking plugin for jQuery.
425 stars 42 forks source link

Better document the ability to link non-form-elements #33

Open ghillert opened 13 years ago

ghillert commented 13 years ago

Hi,

I seem to have a hard time getting non-form-fields such as

and linked up. The documentation vaguely states that it is possible but all the examples are targeting forms and specific form fields (which works great). However, often I want to link not only form data but also generic object that are linked to lets say "div" or "span" elements, or values in "tables" etc.

E.g. I have JavaScript objects that maybe updated via AJAX/websockets etc. and I would like to automagically cascade those property changes to other elements in my page (but not necessarily form fields).

Adobe Flex has great support for this "propert binding" and I believe Sproutcore use this as well. So I would think that jquery-datalink is exactly what I have been looking for. Thus, if you could add an example to your demo or readme that would be quite helpful.

Thanks!

Cheers,

Gunnar

aw-emberex commented 13 years ago

"I seem to have a hard time getting non-form-fields such as"

Can you please complete this sentence? :D

ghillert commented 13 years ago

Oops must have fat-fingered something and now I can't remember what that particular sentence was supposed to be ;-) Anyway, what I meant is that I able get the linking of form fields to work quite easily. But I was unable to link plain objects and let's say values in table cells or span elements. Maybe it is just a documentation issue as almost all examples used form-fields/data as examples. Thus, if you could add some other examples that do data-linking that would be super helpful.