Skip to content

Instantly share code, notes, and snippets.

@elpuas
Created April 4, 2019 16:57
Show Gist options
  • Save elpuas/23cf70166f08f08ce3282b18a45c0a41 to your computer and use it in GitHub Desktop.
Save elpuas/23cf70166f08f08ce3282b18a45c0a41 to your computer and use it in GitHub Desktop.
Trim
// Trim Homepage cards on Mobile
// if ($(window).width() < 700) {
// // Select Each Card Section
// let cardsSel = $('[class^="sec-"] .category__card-title');
// // Get Only THe Items after the First Child
// let divToTrim = $.grep(cardsSel, function (x, index) {
// return (index % 4) != 0;
// });
// // Iterate over the array and get the Text
// $(divToTrim).each(function (index) {
// // let trimmed = $(this).text();
// console.log(index + ": " + $(this).text().replaceWith('los cambie todos'));
// // console.log(text_truncate(trimmed[0]));
// })
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment