Thanks for downloading TopUp!

You must be thinking: "Great, I've downloaded TopUp! But now what?". No need to worry, this download is provided with examples and instructions regarding the usage of the library.

Some examples


When including from gettopup.com (the easiest setup)

I have put a lot of examples in the examples directory. They are all implemented with this setup.

  1. Put the following in the head element:
    <script type="text/javascript" src=""></script>
    Note: You can configure TopUp (libs, fast mode, paths) in the querystring of the URL (read documentation)
    ( you can also include a specific release by replacing latest with the version e.g. 1.3.2 )

When hosting the Javascript and images yourself

Please note that this page is implemented with this setup. I assume hosting TopUp will not be a problem.

  1. Copy the entire(!) jquery directory in the same directory as the TopUp Javascript file. TopUp will automatically determine which Javascript libraries (jQuery and/or jQuery UI) to include from the jquery directory when missing. Please note that TopUp will only include one(!) file to reduce the amount of HTTP requests! An include will look like this:
    <script type="text/javascript" src="path/to/your/jquery/*.js"></script>
  2. Copy the entire(!) images directory to the correct location. At default, TopUp assumes that the images reside at the same host as the file itself in the following path /images/top_up/. You can change the path (and even the host) by changing the variables TopUp.host and TopUp.images_path as the following:
    <script type="text/javascript">
    </script>
    Note:  The proper place for Rails developers would be the application.js
  3. Copy the entire(!) players directory to the correct location. At default, TopUp assumes that the players reside at the same host as the file itself in the following path /players/. You can change the path and host by changing the variables TopUp.host and TopUp.players_path as the following:
    <script type="text/javascript">
      TopUp.players_path = "assets/players/";
    </script>
    Note:  The proper place for Rails developers would be the application.js
  4. Now you start using TopUp on your webpages by putting the following in the head element:
    <script type="text/javascript" src="path/to/your/top_up-min.js"></script>
    Note: You can configure TopUp (libs, fast mode, paths) in the querystring of the URL (read documentation)

Remember: You can still use Prototype without having conflicts, just make sure you include TopUp first.


适用浏览器:IE8、360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗.

来源:Gxl网-jquery插件