Skip to content

Instantly share code, notes, and snippets.

@thecodejunkie
Created January 18, 2013 13:01
Show Gist options
  • Save thecodejunkie/4564425 to your computer and use it in GitHub Desktop.
Save thecodejunkie/4564425 to your computer and use it in GitHub Desktop.
modal binding for knockoutjs that utilizes fancybox internally
ko.bindingHandlers.modal = {
update: function (element, valueAccessor) {
$(element).click(function () {
$.fancybox({ content: $('<div/>').addClass('list-widget').html($('.content', $(element).parent()).html()) });
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment