2

特定のアイテムをクリックすると他のアイテムが削除されるページがあります。戻るボタンを押すと、$(document).ready(function(){jqueryを起動するために使用した機能以外のすべての機能が削除される可能性があるかどうか疑問に思っていました。私は試した:

$(window).on('hashchange',function() {
    var hash = location.hash.substring(1);
    if($('.container1').css('display') === 'none') {
        $('.container').show();
    } else if($('.container1').css('display') === 'none') {
        $('.container').show();
    }
});

それはうまくいきませんでしたが

要素の削除のフィドルは次のとおりです。

http://jsfiddle.net/fuwJy/

4

0 に答える 0