Created
October 30, 2014 06:38
-
-
Save zakki/9bc02d9e9b04cc8f12ce to your computer and use it in GitHub Desktop.
holder.js with knockout.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ko.bindingHandlers["holderJs"] = { | |
| init: function (element, valueAccessor) { | |
| var value = valueAccessor(); | |
| $(element).attr("data-src", ko.unwrap(value)); | |
| Holder.run({ images: element }); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment