Special Events

A collection page of Gaiam

category
Products
0
Active ads
0
Depth
—
Published
2017/02/24

About

// config.showChars) { var c = content.substr(0, config.showChars); if (c.indexOf(' = 0) // If there's HTML don't want to cut it { var inTag = false; // I'm in a tag? var bag = ''; // Put the characters to be shown here var countChars = 0; // Current bag size var openTags = []; // Stack for opened tags, so I can close them later var tagName = null; for (var i = 0, r = 0; r ', i)); // If its a closing tag if (tagName[0] == '/') { if (tagName != '/' + openTags[0]) { config.errMsg = 'ERROR en HTML: the top of the stack should be the tag that closes'; } else { openTags.shift(); // Pops the last tag from the open tag stack (the tag is closed in the retult HTML!) } } else { // There are some nasty tags that don't have a close tag like if (tagName.toLowerCase() != 'br') { openTags.unshift(tagName); // Add to start the name of the tag that opens } } } if (inTag && content[i] == '>') { inTag = false; } if (inTag) { bag += content.charAt(i); } // Add tag name chars to the result else { r++; if (countChars 0) // I have unclosed tags { //console.log('They were open tags'); //console.log(openTags); for (j = 0; j '; // Close all tags that were opened // You could shift the tag from the stack to check if you end with an empty stack, that means you have closed all open tags } break; } } } } c = $(' ').html(bag + ' ' + config.ellipsesText + ' ').html(); }else{ c+=config.ellipsesText; } var html = ' ' + c + ' ' + content + ' ' + config.moreText + ' '; $this.html(html); $this.find(".allcontent").hide(); // Hide all text $('.shortcontent p:last', $this).css('margin-bottom', 0); //Remove bottom margin on last paragraph as it's likely shortened } }); }; })(jQuery); $(document).ready(function() { $(".text-collapse").shorten(); }); // ]]> Yoga Deals Mats, blocks, straps, bags, towels, and the list goes on: sometimes, we make a little too much of something and need more room in our warehouse. When this happens, we do a little number crunching, a little emailing, a little phone-calling, a li