I have a variable retrieved using localstorage. On the next page I want to create a variable and add a CSS style to it before using it.
The variable in this is packageName, which works fine if I dont add the css. This is what I've tried below
var packageName = ((localStorage['chosenPackage']).css('text-transform','capitalize'));
$('.js-package-name').text('1 x ' + packageName + ' Profile');
But it returns Uncaught TypeError: localStorage.chosenPackage.css is not a function
$but even stillpackgeNamewill be a jQuery object so not really clear what you are trying to do