Skip to content

Instantly share code, notes, and snippets.

@MKorostoff
Created February 22, 2012 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MKorostoff/1886708 to your computer and use it in GitHub Desktop.
Save MKorostoff/1886708 to your computer and use it in GitHub Desktop.
//If the overall string is shorter than the trim length, we just execute the "show more" function, and hide the more/less controls
var click_hider = jQuery('.node-type-video .views-field-body-1 .field-content').html().length;
if (click_hider<=65) {
jQuery('.node-type-video .view-id-video.view-display-id-block_1 .views-field.views-field-body').show();
jQuery('.node-type-video .view-id-video.view-display-id-block_1 .views-field.views-field-body-1').hide();
jQuery('.node-type-video .more-button').hide();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment