I would like to change href target in a mobile version.
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
document.getElementById("myAnchor").href = "mobile-url"; //change url
document.getElementById("myAnchor").target = "_blank"; //change target
}
You can refer this to find "the best way to detect a mobile device in jQuery"