JQuery filesize plugin

Converting raw bytes size into human readable string is a very frequently used task.

I developed a plugin that converts raw bytes into KB or MB and its usage is very simple.

Suppose if you want to show 1000 bytes in human readable form inside a span assign the value as size attribute

<span class="jqfilesize" size="1000"></span>

and use jQuery(".jqfilesize").filesize();

output will be <span class="jqfilesize" size="1000">1 KB</span>

Download the plugin here

Comments

A said…
Amar, why not upload it to http://www.github.com/ ?
amar said…
Sure i will upload to github. Thanks for the suggestion

Popular posts from this blog

Proper way to have an anchor tag with onclick event

My FIRE Journey

CORS issues with IE9 and workarounds