var btnlist="";
$("#divPopup").on("click", "li", function () {
var $this = $(this);
// get currect id an replace with right
var newId = $this.attr('Id').replace("Left", "Right")
// check if the image is not for True
if ($('#' + newId).find('img').attr('class') != 'checkImage') {
$this.toggleClass("selected");
if ($this.attr('class') == "selected") {
btnlist.
$('#' + newId).show(); // <== i want to store Newid each time when.show() method ex
}
else {
var newId = $this.attr('Id').replace("Left", "Right")
$('#' + newId).hide();
}
}
});
btnlistを保存したい。$('#' + newId).show();
<== when.show() メソッドが実行されるたびに Newid を保存したいのですが、どうすれば保存できますか?
たとえば、10 個の li 要素があり、すべてが非表示になっています。、今度は 5 li 要素をクリックして、それらをショーとして作成したことを見てみましょう!
表示可能なアイテムのリストを作成するにはどうすればよいですか? このようなもの var Visiable = ([li1, li2, li3,li4,li5]); このようなことを達成するために、どのコード行を追加する必要がありますか