Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Shortly URL shortener using TailwindCSS and jQuery

#tailwind-css#jquery
JesseStone• 370

@jesseburn

Desktop design screenshot for the URL shortening API landing page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi everyone! Could I please get some help with my local storage? I know I need to work on the responsive version of my output URL but I'm confused me as is to why my local storage does not work correctly.

Community feedback

Thomas Kressman• 110

@tkressma

Posted

Hey Jesse, good job.

I HIGHLY recommend you put your script in a seperate file (E.G. script.js) then import it at the end of your body - or, at the very beginning of the body tag using defer.

Similar to what Haybuka said, you first need to "fill" your localStorage with an item before trying to access it. You would want to do this upon successfully fetching some data from the API. You can do this by writing localStorage.setItem('<some name resembling the url data>', <the object recieved from the api call>). Then, when you want to retrieve the localStorage data, you would write localStorage.getItem('<name you decided on calling the item'>).

Check out more about localStorage on the docs: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage

0

JesseStone• 370

@jesseburn

Posted

@tkressma thank you for your input! I will try that out!

0
Haybuka Paschal• 670

@Haybuka

Posted

Hi... Nice Usage of JQuery, Maybe try use a separate JS file instead of the embedded with HTML... For the local storage, i couldnt find where you set your data to localStorage,you have to set it up,before you can pull from it.... Nice work on the documentation also

0

JesseStone• 370

@jesseburn

Posted

@Haybuka Thank you! I will work on that!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord