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();
}
}
});
i want to store btnlist.$('#' + newId).show();
<== i want to store Newid each time when.show() method execute, How can i store it.?
for example, there is 10 li element all are hidden ! , now let's see i click on 5 li element, and made them as show!
how can i create list of visiable items ? something like this var visiable = ([li1, li2, li3,li4,li5]); which line of code i need to put more to achieve something like this