conditional - Conditionally load different Javascript for different domains on mouse click -


i working on website have lot of external links different websites amazon.in, flipkart.com, snapdeal.com etc.

lets have 3 different javascript files

amazon.js snapdeal.js flipkart.js restall.js 

i want when user clicks on link amazon.in base url amazon.js should load. same others , don't want load js file if base url doesn't match in these three.

-ravi


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -

jquery - jqGrid update specific column data with out refreshing the entire column? -