Share Posted February 10 Is there a way around the splitText setup with "type: "lines"" to ensure it doesn't remove line breaks (<br>) when the content is wrapped in a <p>?? When using "words" or "chars" it keeps the breaks as they are, but when "lines" is selected, it removes those breaks and doesn't create new lines for them. It seems to use the outer <p> tags as what it sees as breaks, even if there is a <br> inside. Link to comment Share on other sites More sharing options...
Share Posted February 10 Hi Aaron, SplitText should work with <br> tags. Do you have minimal demo that shows the issue? Link to comment Share on other sites More sharing options...
Author Share Posted February 10 No problem. See below. See the Pen bGYWQGz by aaronrobb (@aaronrobb) on CodePen Link to comment Share on other sites More sharing options...
Share Posted February 10 SplitText lines aren't designed to work with nested elements. Is there any reason you don't split the <p>? Link to comment Share on other sites More sharing options...
Author Share Posted February 11 I was going for a 'slide in from below' effect on multiple paragraphs. So this is what it would look like, and parts like the bolded areas should have line breaks, but since it strips out any line breaks, it just looks like one solid paragraph. See the Pen MWOooNJ by aaronrobb (@aaronrobb) on CodePen Link to comment Share on other sites More sharing options...
Share Posted February 12 Are you looking for something like this?: See the Pen OJOjPOP?editors=0010 by GreenSock (@GreenSock) on CodePen 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now