I have few tabs which their ID is the Item in localstorage which I’m trying to fadeIn.
Tab fadeIn with: $('Tab1').show();
Now, I’ve set the value of ‘Tabvalue‘ to ‘Tab1‘ and I tried to fade it in as follow: $("#" + $(localStorage.getItem("TabValue"))).Show(); but it doesn’t seem to work.
Does anyone know how can I solve this problem?
Try this:
the localStorage value doesn’t need to be wrapped in
$()as it’s a string, gets converted to an jQuery object, and back to a (mostly useless) string. Also,Show()needs to beshow().