0
我有下面的代碼,這是非常好的,但有一個改變我的整個URL,我只是想改變的根源問題:當我改變基本網址,而不會影響文物
當前網址:
** ** http://www.domain.com/country/名稱永久變
通過以下網址:
** ** http://www.domain.com/mobile/es/country/名稱永久變
我目前的jQuery:
var hrefs = ['http://www.domain.com/country/', 'http://www.domain.com/mobile/es/country/'];
$(window).on('resize', function() {
$('.cnt-wrapper a').attr('href', function() {
return hrefs[$(window).width() < 480 ? 0 : 1];
});
}).trigger('resize');