JSFiddle - React, Tailwind, and code Playground

by ryanttb

HTML

<ul>    
    <li><a class="normal" href="fileupload://new?callbackURL=">Picup normal</a></li>
    <li><a class="jqm" href="fileupload://new?callbackURL=">Picup jqm</a></li>
</ul>

JavaScript

var loc = window.location,
    normal = loc.protocol + "//" + loc.hostname + loc.pathname.replace(/upload.html/, "picup.html"),
    jqm = $.mobile.path.makeUrlAbsolute("picup.html", loc.href);


$(".normal").attr("href", normal).text(normal);
$(".jqm").attr("href", function( i, attr) {
    return attr + jqm;
}).text(jqm);