基本的には、リンクをクリックするとiframeで開きますが、親ページのURLはハッシュで更新されますが、iframeのURLは元のものになるように設定しようとしていますクリックされたURL(ハッシュなし)。私は、最初のクリックイベントが機能するところまで行きました。変更イベント(ユーザーがページに直接リンクしている場合)は機能しません。ここに私のコードの抜粋は次のとおりです。jquery addressとIframe
$j('.products-grid .item a, .post a').click(function(){
$details.fadeIn().addClass('active');
$j.address.value($j(this).attr('href').substr(2));
$details.animate({left:detailGap}, { duration: 500, easing: 'easeInOutExpo'});
});
}).change(function(event) {
$iframe.attr('src', event.value);
$details.fadeIn().addClass('active');
$details.animate({left:detailGap}, { duration: 500, easing: 'easeInOutExpo'});
var loadurl = location.origin + location.pathname +location.hash.substr(1);
alert(loadurl);
$iframe.attr('src', loadurl);
});
すなわち:URL、http://www.url.com/product-1(のiframe URL) のために、私はそれがhttp://www.url.com/#/product-1(ページのURL)として、これはMagentoのである を表示します。
おかげで、ロバート