# The code to show only part of the text works on preview but not inline.

**URL:** <https://forum.wixstudio.com/t/the-code-to-show-only-part-of-the-text-works-on-preview-but-not-inline/7722>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [December 29, 2020, 11:25am UTC](https://forum.wixstudio.com/t/the-code-to-show-only-part-of-the-text-works-on-preview-but-not-inline/7722 "2020-12-29T11:25:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![textes2021](https://avatars.discourse-cdn.com/v4/letter/t/eb8c5e/32.png) [@textes2021](https://forum.wixstudio.com/u/textes2021)\
**Post date:** [December 29, 2020, 11:25am UTC](https://forum.wixstudio.com/t/the-code-to-show-only-part-of-the-text-works-on-preview-but-not-inline/7722/1 "2020-12-29T11:25:08Z")

</div>

Hello people, this has been really urgent for three days. I made this code to only show part of the texts in the homepage, and it was working but for three days it has stopped working and I have no idea what happened. Permissions are for everyone and sandbox / live are synchronized. The strangest thing is that everything is normal in preview, but not in the online version. PLEASE HELP MEEE! $w.onReady( () =\> { $w( " [#dataset1](https://www.wix.com/corvid/forum/search/~num~dataset1) " ).onReady( () =\> {  
$w( " [#repeater1](https://www.wix.com/corvid/forum/search/~num~repeater1) " ).onItemReady( ($item, itemData, index) =\> {  
let theItem = itemData.description;  
var shortDescription = theItem.substr( 0 , 25 );  
$item( " [#description](https://www.wix.com/corvid/forum/search/~num~description) " ).text = shortDescription + " . . . " ;  
});

} );

} );

[https://textes2021.wixsite.com/monsite](https://textes2021.wixsite.com/monsite)

 ![](https://us1.discourse-cdn.com/wix/original/3X/e/6/e637b442882d0815de08e9e65b4439571e110787.jpeg)

---

<div class="post-metadata">

**Author:** ![mvveiga](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/mvveiga/32/122599_2.png) [@mvveiga](https://forum.wixstudio.com/u/mvveiga)\
**Post date:** [December 29, 2020, 12:35pm UTC](https://forum.wixstudio.com/t/the-code-to-show-only-part-of-the-text-works-on-preview-but-not-inline/7722/2 "2020-12-29T12:35:54Z")

</div>

Check if the $w(‘#description’) is connected to dataset.  
That element is being filling by code not by dataset.

---

<div class="post-metadata">

**Author:** ![textes2021](https://avatars.discourse-cdn.com/v4/letter/t/eb8c5e/32.png) [@textes2021](https://forum.wixstudio.com/u/textes2021)\
**Post date:** [December 29, 2020, 3:27pm UTC](https://forum.wixstudio.com/t/the-code-to-show-only-part-of-the-text-works-on-preview-but-not-inline/7722/3 "2020-12-29T15:27:56Z")

</div>

OK thank you the problem is solved
