ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

scrolling on iphone and android

andij62
3 Feb 2012 11:48:08 GMT
3 Feb 2012 11:48:08 GMT

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

andij62
4 Feb 2012 11:12:12 GMT
4 Feb 2012 11:12:12 GMT

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

thanks

andij62
7 Feb 2012 08:50:35 GMT
7 Feb 2012 08:50:35 GMT

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

twiegandTop Contributor
7 Feb 2012 15:55:31 GMT
7 Feb 2012 15:55:31 GMT

Andi,

Have a look here.

Regards,

Todd

andij62
31 Mar 2012 16:10:27 GMT
31 Mar 2012 16:10:27 GMT

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