View Single Post
  #6  
Old 05-24-2016, 12:06 PM
Tara K's Avatar
Tara K Tara K is offline
 
Join Date: Apr 2016
Posts: 43
Default

Quote:
Originally Posted by Chelsy Henry View Post
Thank you for this.

Half of our products were typed in an old Microsoft Word, we then copy and pasted them into Ecwid. I understand the extra spacing from that. The new Word we currently use does not add the extra spacing.

I tried to put the script:
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
Ecwid.OnPageLoaded.add(function(page) {
if ("PRODUCT" == page.type) {
$('.ecwid-productBrowser-details-descr p').each(function(){
if (!$(this).text().trim().length) {
$(this).hide();
}
});
};
});

into the page of wordpress where Ecwid is but that did not work.
I then tried to put it in the header.php file (but only at the end of it) because I'm unsure where else it would go.
That did not work either..

What am I doing wrong with the script?

Thank you again!
Hello Chelsy,

Thank you for the clarification. Sorry, I provided you the code with missing <script> tags. Please accept my apologies for this. Here is the corrected code:

Code:
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
Ecwid.OnPageLoaded.add(function(page) {
if ("PRODUCT" == page.type) {
$('.ecwid-productBrowser-details-descr p').each(function(){
if (!$(this).text().trim().length) {
$(this).hide();
}
});
};
});
</script>
Try it please and let me know the results. You shouldn’t put it in the header.php file. You should put it in the end of the site page where your Ecwid is installed.