Hi everyone.
After searching for an answer to my problem, I’m unable to find a solution. I’m a noob and I haven’t got so much experience about Jquery.
Here is my problem:
I want to make a book app for smartphones and tablets. I’ve got a long text I want to place in multiple pages, but I want the app to generate this pages according to the lenght of the text and the screen size of the device. The text should full a page and automatically start a new page to continue. The page generation will continue until all text is placed on pages.
Does anyone know how to do it?
Thank You
Split text in automatic pages
Page 1 of 11 Replies - 6845 Views - Last Post: 02 November 2012 - 03:27 AM
Replies To: Split text in automatic pages
#2
Re: Split text in automatic pages
Posted 02 November 2012 - 03:27 AM
Hello Xavuse,
You appear to be asking a very large question and you've supplied no code yourself to show that you have attempted the issue. I do know myself how I might achieve said goal for an application but it would take too much time and effort to explain every intricate detail, so I shall point you in some directions.
Getting screen sizes
Use the .width() and .height() functions in conjunction with a jQuery wrapped $(window) object.
http://api.jquery.com/width/
http://api.jquery.com/height/
Splitting large chunks of text
The splice() and split() functions will help you tear up the text to the desired sizes.
http://www.w3schools...sref_splice.asp
http://www.w3schools...jsref_split.asp
Extras
The following two CSS properties might be of use to you also in this task.
http://www.w3schools...r_word-wrap.asp
http://www.w3schools...line-height.asp
Remember, we are here to help you, not to code for you.
You appear to be asking a very large question and you've supplied no code yourself to show that you have attempted the issue. I do know myself how I might achieve said goal for an application but it would take too much time and effort to explain every intricate detail, so I shall point you in some directions.
Getting screen sizes
Use the .width() and .height() functions in conjunction with a jQuery wrapped $(window) object.
http://api.jquery.com/width/
http://api.jquery.com/height/
Splitting large chunks of text
The splice() and split() functions will help you tear up the text to the desired sizes.
http://www.w3schools...sref_splice.asp
http://www.w3schools...jsref_split.asp
Extras
The following two CSS properties might be of use to you also in this task.
http://www.w3schools...r_word-wrap.asp
http://www.w3schools...line-height.asp
Remember, we are here to help you, not to code for you.
Page 1 of 1

New Topic/Question
Reply


MultiQuote



|