简体   繁体   中英

Is there anyway to link a jvector map to a search result?

So my requirement is that when user click on a specific country on a continent map( http://jvectormap.com/maps/world/south-america/ ), it needs to be redirect to a search result page with the items in related country. Can anyone help me to write the JS code?(Note: Im writting this custom JS for a shopify web)

You have to use the event listener onRegionClick

onRegionClick: function (event, code) {
    window.location.href = "yourpage?regionCode=" + code
}

Replace with the page you use to search results by region code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM