Created
July 31, 2014 21:15
-
-
Save OnkelTem/18acd9ee9156055ed652 to your computer and use it in GitHub Desktop.
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
<div x-ng-repeat="item in data[key]" x-sd-toggle-fold class="item"> | |
<div> | |
<div x-ng-bind-html="item.field_fc_info.teaser || item.field_fc_info.full | unsafe" class="left"></div> | |
<div x-ng-bind-html="item.body.teaser || item.body.full | unsafe" class="center"></div> | |
<div ng-if="item.body.teaser" class="right"><a href="#" class="toggle">Unfold</a></div> | |
</div> | |
<div ng-if="item.body.teaser" style="display: none"> | |
<div x-ng-bind-html="item.field_fc_info.full || item.field_fc_info.teaser | unsafe" class="left"></div> | |
<div x-ng-bind-html="item.body.full || item.body.teaser | unsafe" class="center"></div> | |
<div class="right"><a href="#" class="toggle">Fold</a></div> | |
</div> | |
</div> | |
directive('sdToggleFold', ['$timeout', function ($timeout) { | |
return function(scope, element, attrs) { | |
$timeout(function() { | |
console.log('-', element.children().eq(0).find('.toggle')); | |
}) | |
}; | |
}]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment