top of page

Forum Posts

djsphotography777
May 29, 2018
In Coding with Velo
Hi All I am new to Wix Code and just tried adding a collapsible text box with a show more/less button. I used the code in the Wix tutorial for this and the button works fine, but the text now has a load of &codes dotted about when I preview that I don't see when I am in edit mode. The code I used is // how many characters to include in the shortened version const shortTextLength = 40; // read the full text and store it in the fullText variable fullText = $w("#myTextElement").text; // // grab the number of characters defined in shortTextLength and store them in the shortText variable shortText = fullText.substr(0, shortTextLength) + "..."; // set the contents of the text element to be the short text $w("#myTextElement").text = shortText; Any help would be much appreciated? Many thanks Dave Smith
0
1
37

djsphotography777

More actions
bottom of page