Sha256: 005c6c838dcb09a8d697e2a47345513b22547f2625dd6a109ae8293fd9ba80a2
Contents?: true
Size: 747 Bytes
Versions: 5
Compression:
Stored size: 747 Bytes
Contents
controllers.show = function(key) { var _this = this; var story = _.find(store, function(story) { return story.key == key; }); function loadStory(url) { var iframe = $("<iframe />"); $("body").append(iframe); iframe.load(function() { $("#story").html(iframe[0].contentDocument.body.innerHTML); $.twoup.layout(); iframe.remove(); }); iframe.attr("src", url); } this.init = function() { console.log("starting show"); $("#view-show").show().addClass("current-view"); loadStory(story.url); } this.render = function() { } this.destroy = function() { console.log("destroying show"); $("#story").empty(); $("#view-show").hide().removeClass("current-view"); } }
Version data entries
5 entries across 5 versions & 1 rubygems