Reputation: 932
I want to define an anchor tag href in my backbone stickit bindings, such that whenever a model attribute updates, the href of my anchor tag updates
Something like this,
bindings : {
".facebook-profile-icon('href')" : "facebook"
".twitter-profile-icon('href')" : "twitter"
}
Currently, I am doing something like this :
bindings : {
".facebook-profile-icon" : "facebook"
".twitter-profile-icon" : "twitter"
}
render : function(){
this.stickit();
}
This just(understandably) updates the html of the classes instead of updating the hrefs.
Is there a way i can do this in backbone stickit?
Upvotes: 0
Views: 737
Reputation: 1211
Backbone.StickIt is well documented. In your case you want to update attributes, so you might use: https://nytimes.github.io/backbone.stickit/#attributes
Upvotes: 1