kango.io

Summary

Name Description
getResourceUrl Returns local resource URL

Methods

getResourceUrl

kango.io.getResourceUrl(filename)

Returns resource URL.

Arguments:
  • filename (string) – File name

Note

Resources must be placed in common/res directory.

Example:

$(document.createElement('img')).attr({
    src: kango.io.getResourceUrl('res/tree.png'),
    title: 'Christmas tree'
}).css({
    position: 'absolute',
    top: '10px',
    left: document.body.clientWidth - 280 + 'px',
    'z-index': '10000'
}).appendTo(document.body);