Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Asynchronous loader/initializer for vkontakte (vk.com) widgets
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
README.md
license.txt
vk-async.js
vk-async.min.js

README.md

Requirements

jQuery 1.2.1+

Usage

Put script tags to the <head> of your page

<script type="text/javascript" src='http://yandex.st/jquery/1.6.2/jquery.min.js'></script>
<script type="text/javascript" src='/media/vk-async.min.js'></script>

Push all VK-related code to be executed after VK API initialization like that:

VK_async.ready(function () {
    VK.init({apiId: YOUR_API_ID, onlyWidgets: true});
    VK.Widgets.Comments("vk_comments");
});

API

By default (http://userapi.com/js/api/openapi.js?48) is used to load VK API. You can change URL like that:

<script type="text/javascript">
   VK_async.setAPIScriptPath('http://userapi.com/js/api/openapi.js?49');
</script>
Something went wrong with that request. Please try again.