Here is a very simple jQuery [URL] QR Code plugin based on goqr.me api.You are welcome to use it. Feel free to give your feedback. Your comments are welcome.
(function( $ )
{
$.fn.qrcode = function(options)
{
var settings =
{
baseURI: 'http://api.qrserver.com/v1/create-qr-code/?data=',
source: 'http://goqr.me',
data: window.location.href,
size: '250x250',
linkBack: true,
css: { 'border':'20px solid #fff' }
}
settings = $.extend({},settings,options);
return this.each(function()
{
$(this).html( '<img>' )
.find('img').attr('src',settings.baseURI
+ encodeURIComponent(settings.data) + '&size=' + settings.size)
.css(settings.css).filter(function() { return settings.linkBack; })
.wrap( '<a href="' + settings.source
+ '" style="text-decoration:none;"></a>' );
});
};
})( jQuery );