Home > Web Front-end > JS Tutorial > body text

Iscool pull-down refresh implementation method

小云云
Release: 2018-01-06 10:23:21
Original
1420 people have browsed it

This article mainly brings you a method to implement the Iscool pull-down refresh function (recommended). The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor to take a look, I hope it can help everyone.

Simple pull-down refresh implementation method

css style:

*{
        margin: 0px;
        padding: 0px;
        
      }
      #wrapper{
        width: 100%;
        height: 150px;
        border: 1px solid red;
        overflow: hidden;
        position: absolute;
      }
      #shua{
        text-align: center;
      }
Copy after login

HTML code

<p id="wrapper">
      <p>
        <p id="shua">刷新</p>
        <ul>
          <li>1</li>
          <li>2</li>
          <li>3</li>
          <li>4</li>
          <li>5</li>
          <li>6</li>
          <li>7</li>
          <li>8</li>
          <li>9</li>
          <li>10</li>
        </ul>
      </p>
    </p>
Copy after login

Before writing js code, you must introduce the jQuery plug-in and iscroll plug-in

Then the js code is as follows:

Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template