0

scrolling on iphone and android

asked 2012-02-03 11:48:08 +0800

andij62 gravatar image andij62
303 1 7

Hi all,

my Applikation runs very well on iphone and android, but i have a problem with scrolling on android. My grid scrolls very good with one finger on iphone but not on android. I found an example to scroll content on android with touchScroll a jQuery plugin.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <title>touchScroll jQuery plugin simple example</title>
       <style>
           body {
               overflow-y: hidden;
          }

         p {
             font: 18px Georgia;
             color: #444;
             margin: 0;
             padding: 20px;
         }

        code {
            font: 18px monospace;
            color: #444;
            margin: 0;
        }

        section {
            display: block;
            position: fixed;
            left: 30px;
            top: 30px;
            bottom: 30px;
            right: 30px;
            background-color: #ddd;
            overflow-y: auto;
        }

        nav {
           display: block;
           height: 100%;
           -webkit-perspective: 1000;
           -webkit-backface-visibility: hidden;
        }
    </style>
</head>
<body>
<section>
    <nav>
        <p>View this on an android device.</p>
        <p>View this on an android device.</p>
        <p>View this on an android device.</p>
        <p>View this on an android device.</p>
        <p>View this on an android device.</p>
        <p>View this on an android device.</p>
        <p>View this on an android device.</p>
        <p>View this on an android device.</p>
     </nav>
</section>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<script src="https://github.com/neave/touch-scroll/raw/master/touch-scroll.min.js"></script>
<script>
    $(document).ready(function() {
        if (!!('ontouchstart' in window)) {
            $('nav').touchScroll();
        }
    });
</script>
</body>
</html>

can anyone help me to include this jQuery plugin in an zul-file

thanks for the help
Andi

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2012-02-04 11:12:12 +0800

andij62 gravatar image andij62
303 1 7

Please can anyone help me to integrate "touch-scroll.min.js" in a zul-file to scroll content in a <div>

thanks

link publish delete flag offensive edit

answered 2012-02-07 08:50:35 +0800

andij62 gravatar image andij62
303 1 7

please can anyone give me a sample how i can include the jQuery-plugin in a zul-file! It is very important for me!!

link publish delete flag offensive edit

answered 2012-02-07 15:55:31 +0800

twiegand gravatar image twiegand
1807 3

Andi,

Have a look here.

Regards,

Todd

link publish delete flag offensive edit

answered 2012-03-31 16:10:27 +0800

andij62 gravatar image andij62
303 1 7

Hi Todd,

i have a look to the sample but i have a problem to integrade touch-scroll.min.js in my zul. Is it possible to help me with integration in a zul-file?

Regard Andi

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-02-03 11:48:08 +0800

Seen: 329 times

Last updated: Mar 31 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More