admin管理员组文章数量:1025218
I am developing application using webview in android. i am loading a page into webview and splitting multiple columns dynamically using CSS3 webkit property. once user reach the last page/column i have to show the TOC confirmation dialog. can anyone please advice me how to do that ?
height:600px;
-webkit-column-width:600px;
-webkit-column-count:auto;
I am developing application using webview in android. i am loading a page into webview and splitting multiple columns dynamically using CSS3 webkit property. once user reach the last page/column i have to show the TOC confirmation dialog. can anyone please advice me how to do that ?
height:600px;
-webkit-column-width:600px;
-webkit-column-count:auto;
Share
Improve this question
edited Dec 27, 2011 at 11:21
Lucifer
29.7k25 gold badges92 silver badges144 bronze badges
asked Sep 30, 2011 at 10:59
JegaJega
6967 silver badges17 bronze badges
1
- 1 You need to provide the information of your paging method - if you use the native overflow scroll, try to get the value of scrollX – vincicat Commented Nov 17, 2011 at 16:47
3 Answers
Reset to default 1How your TOC confirmation dialog is setup?
One possible solution could be to use the :nth-last-of-type(N) selector to select last page/column element http://reference.sitepoint./css/pseudoclass-nthlastoftype.
Try putting a small element at the end of the text, and then wait for it to appear on screen. It is easily done using jQuery with jquery-appear.
I forked @visualidiot's jsfiddle to create an example using said techniques. Haven't tested it using jQuery Mobile though.
- I put a
<span>
element at the end of the text. The span is floated right to make sure (most of) the last column is shown. In this example, the<span>
is not empty (and highly visible), but it would be better if it was just empty. - The javascript
confirm()
dialog screws up the scrolling a bit by locking mouse focus on the scroll slider (tested in Chrome 16 on Windows). Showing a confirm dialog in HTML would not. - Since
.appear()
works for vertical scrolling as well, this degrades nicely when not having-webkit-column-*
available (tested using IE9).
Get the total width of your element, and divide it by the width of a single column. Here's an example: http://jsfiddle/Ecp9M/
I am developing application using webview in android. i am loading a page into webview and splitting multiple columns dynamically using CSS3 webkit property. once user reach the last page/column i have to show the TOC confirmation dialog. can anyone please advice me how to do that ?
height:600px;
-webkit-column-width:600px;
-webkit-column-count:auto;
I am developing application using webview in android. i am loading a page into webview and splitting multiple columns dynamically using CSS3 webkit property. once user reach the last page/column i have to show the TOC confirmation dialog. can anyone please advice me how to do that ?
height:600px;
-webkit-column-width:600px;
-webkit-column-count:auto;
Share
Improve this question
edited Dec 27, 2011 at 11:21
Lucifer
29.7k25 gold badges92 silver badges144 bronze badges
asked Sep 30, 2011 at 10:59
JegaJega
6967 silver badges17 bronze badges
1
- 1 You need to provide the information of your paging method - if you use the native overflow scroll, try to get the value of scrollX – vincicat Commented Nov 17, 2011 at 16:47
3 Answers
Reset to default 1How your TOC confirmation dialog is setup?
One possible solution could be to use the :nth-last-of-type(N) selector to select last page/column element http://reference.sitepoint./css/pseudoclass-nthlastoftype.
Try putting a small element at the end of the text, and then wait for it to appear on screen. It is easily done using jQuery with jquery-appear.
I forked @visualidiot's jsfiddle to create an example using said techniques. Haven't tested it using jQuery Mobile though.
- I put a
<span>
element at the end of the text. The span is floated right to make sure (most of) the last column is shown. In this example, the<span>
is not empty (and highly visible), but it would be better if it was just empty. - The javascript
confirm()
dialog screws up the scrolling a bit by locking mouse focus on the scroll slider (tested in Chrome 16 on Windows). Showing a confirm dialog in HTML would not. - Since
.appear()
works for vertical scrolling as well, this degrades nicely when not having-webkit-column-*
available (tested using IE9).
Get the total width of your element, and divide it by the width of a single column. Here's an example: http://jsfiddle/Ecp9M/
本文标签: javascripthow can i get the webkitcolumncount value and current page or column IdStack Overflow
版权声明:本文标题:javascript - how can i get the webkit-column-count value and current page or column Id? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745611220a2159015.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论