jQueryPlugins
jQueryPlugins copied to clipboard
Relative url fix
Something the likes of this, may help other solve their problem... of course you should write this one less obstrusive... making the changes only in the selected elements instead of the entire document... but still it works.
uno.print=function(jq,options){uno.norelativeurls();jq.printElement(options)}; uno.norelativeurls=function(){var aa=document.getElementsByTagName('img'); for(var a=0;a<aa.length;a++){ if(uno.startswith(aa[a].src,'http://')){continue;} if(uno.startswith(aa[a].src,'https://')){continue;} aa.src=uno.host+location.pathname+aa.src;}};
//Fixes on the fly the issue about images not having relative image src urls not showing correctly in chrome and other browsers where the url above is "about:blank" //Usage : uno.print(jQuery('#elmid'),{OPTIONS HERE})