top of page
Forum Posts
ENVIOS MENSA EXPREX Jorge
Oct 14, 2019
In Coding with Velo
TEXTO ESTATICO - copie el cocigo tal cual dicen de https://support.wix.com/en/article/corvid-tutorial-creating-a-show-more-link y sustitui, el nombre del boton con el mio (button1) y del texto con el mio (text5) pero no me funciona y me da el siguiente error TEXTO NO DEFINIDO Av er si pueden ayudarme, les paso el codigo --------------------- let fullText; // variable to hold the full text
let shortText; // variable to hold the short version of the text
$w.onReady(function () {
// 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(#text5).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(#text5).text = shortText;
});
// check the contents of the text element
if ($w(#text5).text === shortText) {
// if currently displaying short text, display the full text
$w(#text5).text = fullText;
$w(#Button1).label = "Show less";
} else {
// if currently displaying full text, display the short text
$w(#myText5).text = shortText;
$w(#Button5).label = "Show more";
}
export function button1_click(event) {
//Add your code for this event here:
// display the full text
$w(#Text5).text = fullText;
// collapse the button
$w(#Button).collapse();
} ------------------ gracias
0
5
53
ENVIOS MENSA EXPREX Jorge
More actions
bottom of page