Sha256: 4e481633e50da940e798aaf9e78c8470e186c105aabfd3dad926864b7da1c954
Contents?: true
Size: 941 Bytes
Versions: 3
Compression:
Stored size: 941 Bytes
Contents
$(function() { // Transcripts var num_of_rows_to_show = '3'; $('#transcript_table') .find('tr:gt(' + num_of_rows_to_show + ')').hide().end() .after('<div id="more_transcript"><a id="more_transcript_button" class="btn"><i class="icon-arrow-down"></i> <%= I18n.t('kinney.transcript.show_all') %></a><a id="hide_transcript_button" class="btn" style="display:none;"><i class="icon-arrow-up"></i> <%= I18n.t('kinney.transcript.hide') %></a></div>'); $('#transcript_table') .find('tr:nth-child(' + num_of_rows_to_show + ')').addClass('last'); var toggles = function(){ $('table') .find('tr:gt(' + num_of_rows_to_show + ')').toggle(); $('#more_transcript a').toggle(); $('table tr:nth-child(' + num_of_rows_to_show + ')').toggleClass('last'); return false; } $("#more_transcript_button").click(function() { toggles(); }); $("#hide_transcript_button").click(function() { toggles(); }); });
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kinney-0.0.3 | app/assets/javascripts/kinney/clips.js.erb |
kinney-0.0.2 | app/assets/javascripts/kinney/clips.js.erb |
kinney-0.0.1 | app/assets/javascripts/kinney/clips.js.erb |