0
I created a javascript code that hides all different Ivs from the value that was selected in select
.
$(".filter-target").change(function() {
var target = $(this).val();
if (target == 0) {
$('[data-target]').removeClass('hidden');
return;
}
var self = $('[data-target="'+target+'"]');
$('[data-target]').not(self).toggleClass('hidden');
});
When I select the option that I have displayed the others hide normally, but if I test the others they start to get messy and do not obey the order to "hide all those that are not x", the ones that were to appear disappear and come back. what could be wrong?
It would be interesting to have an example in Snippet.
– Wallace Maxters
"they begin to get messy and do not obey the order to "hide all who are not x", this is not very revealing.
– Klaider
@Wallacemaxters the content is dynamic in a plugin I’m using
(fullcalendar)
, it is difficult to create a snippet.– RFL
@nicematt, when I say that gets messy means that those who were not to appear appear appear, those who were to appear disappear, I added more content to improve the question, obg.
– RFL