WiX HTML and typewriter effect, Trying to make each 'sentence' start on a new line |
WiX HTML and typewriter effect, Trying to make each 'sentence' start on a new line |
moe46 |
May 28 2017, 10:34 PM
Post
#1
|
Group: Members Posts: 4 Joined: 28-May 17 Member No.: 26,420 |
I need help. When it comes to being a newbie with HTML you can put me at #1. I have the below code and I am using it in a WiX site with their HTML code feature. It does not matter what I do as far as "br/", "/br", "/ br", and "br /" nothing makes each sentence go to a new line. I also included a screenshot of the result. How do I fix this? Thank you in advance.
<!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> </head> <body> <span id="holder"></span> <p class="effect">Good morning!<br/>Today we are going to learn about sounds.<br/>The first sound we will practice is “th”.<br/>Are you ready?</p> </body> <script> (function($) { $.fn.writeText = function(content) { var contentArray = content.split(""), current = 0, elem = this; setInterval(function() { if(current < contentArray.length) { elem.text(elem.text() + contentArray[current++]); } }, 100); }; })(jQuery); $(".effect").each(function(index) { var text = $( this ).text(); $(this).empty(); $(this).writeText(text); }); //$("#holder").writeText("This is some text"); </script> </html> Attached thumbnail(s) |
Darin McGrew |
May 29 2017, 12:49 AM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
It works fine for me when I paste the markup you provided into an HTML file.
|
moe46 |
May 29 2017, 07:25 AM
Post
#3
|
Group: Members Posts: 4 Joined: 28-May 17 Member No.: 26,420 |
|
pandy |
May 29 2017, 11:07 AM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I fear no one here has experience with Wix.
I looked at their support pages and got the impression they offer ready made pages and that you can edit a little, but what you posted above is a complete HTML page. So, I'm a little confused. |
moe46 |
May 29 2017, 06:58 PM
Post
#5
|
Group: Members Posts: 4 Joined: 28-May 17 Member No.: 26,420 |
I fear no one here has experience with Wix. I looked at their support pages and got the impression they offer ready made pages and that you can edit a little, but what you posted above is a complete HTML page. So, I'm a little confused. See, I'm a big time new comer to HTML and web pages. They have, I guess you can call it a plug-in, where you can paste HTML code into a page and then it shows. When I use the above code it does the typewriter effect. However it runs the sentences together and not on separate lines. |
moe46 |
May 29 2017, 08:03 PM
Post
#6
|
Group: Members Posts: 4 Joined: 28-May 17 Member No.: 26,420 |
I fear no one here has experience with Wix. I looked at their support pages and got the impression they offer ready made pages and that you can edit a little, but what you posted above is a complete HTML page. So, I'm a little confused. See, I'm a big time new comer to HTML and web pages. They have, I guess you can call it a plug-in, where you can paste HTML code into a page and then it shows. When I use the above code it does the typewriter effect. However it runs the sentences together and not on separate lines. If it helps I took a video of what happens when I run a test of the HTML on a site I found. So far it works for you, which is confusing because it didn't for me. I am not able to upload the video here I can send it someone if they want to see. |
pandy |
May 30 2017, 01:16 AM
Post
#7
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I fear no one here has experience with Wix. I looked at their support pages and got the impression they offer ready made pages and that you can edit a little, but what you posted above is a complete HTML page. So, I'm a little confused. See, I'm a big time new comer to HTML and web pages. They have, I guess you can call it a plug-in, where you can paste HTML code into a page and then it shows. When I use the above code it does the typewriter effect. However it runs the sentences together and not on separate lines. In that case you shouldn't paste a complete page in with doctype, HTML and BODY tags. Because those are already there. You should just post the snip you want to show, like for instance the below. CODE <p class="effect">Good morning!<br/>Today we are going to learn about sounds.<br/>The first sound we will practice is “th”.<br/>Are you ready?</p> I don't see how that could be the reason the BR tags went away though. No, a video wouldn't help. But could you post the URL to your page with your paragraph in it? Then we would have a chance to see what has happened anyway. |
Lo-Fi Version | Time is now: 19th April 2024 - 02:45 PM |