Questions tagged [rivets.js]

Rivets.js is a lightweight and powerful data binding + templating solution for building modern web applications.

Rivets.js is a declarative data binding facility that plays well with existing frameworks such as Backbone.js, Spine.js and Stapes.js.


Useful links

103 questions
12
votes
2 answers

Rivets.js event handlers with custom arguments

I've just started with Rivets.js, which looks promising as simple data-binding framework. I've arrived at the point that I don't know how to pass "custom arguments" to the rv-on-click binder, so I tried to take the idea from this:…
Luca Trazzi
  • 1,240
  • 1
  • 13
  • 30
10
votes
1 answer

Backbone: Model-to-template and template-to-model binding

I am in the process of integrating Backbone and Backbone.Marionette into an existing web application project. We plan to leave all the existing functionality in project alone for now but any new functionality we will take advantage of Backbone…
9
votes
1 answer

How to bind deeper than one level with rivets.js

rivets.js newbie here. I want to bind to an item that will be changing dynamically (store.ActiveItem). I tried the following approach, but although store.ActiveItem is set, store.ActiveItem.(any property) is always undefined. Is there a standard way…
Daniel
  • 920
  • 1
  • 11
  • 22
7
votes
3 answers

Rivets.js: When button is clicked, call a function with an argument from a data binding

This is so infuriating. It seems like it should be so simple, but I can't find the magic incantation. Here's the gist of what I need to do:
That…
paulwal222
  • 1,488
  • 11
  • 18
5
votes
3 answers

Outputting a class with Rivets.js?

I thought this would be easier unless I'm missing something but I can't figure out how to output a piece of my data as a class.
doesn't work. It should say the value in that property…
danhere
  • 680
  • 1
  • 8
  • 21
5
votes
1 answer

How do I bind an HTML select to a model value in Rivets.JS?

I'm trying to integrate Rivets.JS into my app. I'm getting the hang of binding values for basic form inputs and regular data in the page, but I can't figure out how to handle selects drop (down menus) with Rivets. I can build a select with the each…
eimajenthat
  • 1,338
  • 3
  • 15
  • 33
5
votes
1 answer

Adding "radio" functionality to buttons when using a custom binder in Rivets.js with Backbone.js

I am using Rivets.js to bind elements to my model. I am using Bootstrap by Twitter for design, and have set up three buttons to choose from the values 1, 2 and 3 (functionally equivalent to radio buttons). I have set up three buttons in a button…
Nils
  • 780
  • 5
  • 16
4
votes
2 answers

Slow performance rendering in client templating engine (Rivets.js)

I'm rendering an array of of about 1000 objects. The html bindings are very heavy (see below). It's taking about 5 seconds to rivets.bind(). Any suggestions on improving performance? I don't think I can afford to bind in chunks as I'm using a…
Micah
  • 1,676
  • 16
  • 23
4
votes
2 answers

Simple Example using Backbone.js and Rivets.js

I am looking for a very simple example where e.g. there is a two way binding between span text and an input element using Backbone.js and Rivets.js. Perhaps there is one in the Rivets.js docs, but I can't find it. Any help please?
Joe
  • 1,841
  • 4
  • 27
  • 43
3
votes
1 answer

rivets.js trying to get custom adapter to work

I am trying to get a custom adapter to work with rivets.js, but it neither changes the model nor does it ever call the routine. If there's someone out there who is also using rivets.js, I could use some help with this one: JsFiddle Example…
LongHike
  • 4,016
  • 4
  • 37
  • 76
3
votes
0 answers

refreshing rivets.js rv-show bound to a value via a custom formatter via another value

Not sure how to best approach this as I have not seen an example of this anywhere. Basically, a formatter defined like this: ... addBindings: function(){ var collection = this.collection; rivets.formatters.filterMatch = function(value){ …
Dimitar Christoff
  • 26,147
  • 8
  • 50
  • 69
3
votes
1 answer

RIVETS.JS - What's the correct syntax in order to resolve a placeholder in html image src?

I've created the following page:

Cisco
  • 532
  • 1
  • 8
  • 24
3
votes
2 answers

Data binding in rivets js

I came across rivets library and tried to do simple example. But I had 2 issues: In tutorial they write "user.name" (with dot) but for me it works only if I write "user:name" When I change the user.name property why DOM doesn't change? The…
Victor
  • 5,073
  • 15
  • 68
  • 120
3
votes
1 answer

Iterating through models for a select field with Rivet.js & Coffeescript

I'm attempting to populate a select field with options using bootstrapped data. I'm encountering an issue when binding my array of models to the jQuery select object... The HTML