Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
Keep scroll position in an element on page on refresh

I set a ul of product variants with horizontal scroll. When i scroll and click on a variant, the page refresh and the scroll return to start. I need to maintain the posistion where it was first of refresh to let see the clicked variant.

ul#group_17 {
    width: 150px;
    display: flex;
    overflow: auto;
    list-style: none;
}
li {margin: 0 10px 0 0}
.input-color {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 60px;
    width: 60px;
}
span {
    height: 60px;
    width: 60px;
    display: block;
} 
<ul id="group_17">
  <li class="float-xs-left input-container">
    <label>
      <input class="input-color" type="radio" data-product-attribute="17" name="group[17]" value="87">
      <span class="color texture" style="background:black"></span>
    </label>
  </li>
  <li class="float-xs-left input-container">
    <label>
      <input class="input-color" type="radio" data-product-attribute="17" name="group[17]" value="88" checked="checked">
      <span class="color texture" style="background:brown;"></span>
    </label>
  </li>
  <li class="float-xs-left input-container">
    <label>
      <input class="input-color" type="radio" data-product-attribute="17" name="group[17]" value="89">
      <span class="color texture" style="background:red"></span>
    </label>
  </li>
  <li class="float-xs-left input-container">
    <label>
      <input class="input-color" type="radio" data-product-attribute="17" name="group[17]" value="90">
      <span class="color texture" style="background:yellow"></span>
    </label>
  </li>
</ul>

How can i do?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!