jQuery getScriptOnce plugin sample

Click on the buttons to see the difference between jQuery's $.getScript() and this plugin.


The normal way

Clicking this button will cause the server to send a javascript back. It keeps doing that when you keep clicking the button.

Request script via normal $.getScript()

The plugin way

Clicking this button will cause the server to send a javascript back. If you click it again it will not send the script again.

Request script via plugin $.getScriptOnce()

Invetek - Loran Kloeze | https://github.com/invetek/jquery-getscriptonce