taipei-light2/modules/video_pro/_video_pro_widget_jqcloud1....

21 lines
851 B
Plaintext

<div class="w-video_data video_data-widget-2">
<%= javascript_include_tag 'video_pro/jqcloud.min' %>
<%= stylesheet_link_tag 'video_pro/jqcloud.min' %>
<div class="my_favorite_latin_words jqcloud" style="height: 100px;"></div>
<script>
$(document).ready(function(){
$('[data-subpart-id="{{subpart-id}}"] .my_favorite_latin_words').jQCloud({{jqcloud_words}}, {
autoResize: true,
afterCloudRender: function(){
var is_chinese = (window.I18n && I18n.locale == "zh_tw" || I18n.locale == "zh_cn");
$(this).find('a').each(function(i,v){
var $v = $(v);
$v.attr('title', is_chinese ? ('另開新視窗前往' + $v.text()) : ('Open ' + $v.text() + ' in new tab'));
$v.attr('target', '_blank');
})
}
});
})
</script>
</div>