I have this code:
var fullpath = $(this)[0].src;
var a = document.createElement('a');
a.href = fullpath;
var imgpath = a.pathname + a.search;
Firefox (and most other browsers) output /showroom/roth_tar/pictures/tar8/11.jpg
bur IE outputs showroom/roth_tar/pictures/tar8/11.jpg (without first slash) and it fails in php then.
How can I fix it? Thx!
You could use @felixkling’s suggestion – http://jsfiddle.net/cgYSF