Created
April 4, 2019 16:57
-
-
Save elpuas/23cf70166f08f08ce3282b18a45c0a41 to your computer and use it in GitHub Desktop.
Trim
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
// 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