Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate <li> elements are added to DOM on every click #1

Open
mikekloeden opened this issue Mar 7, 2014 · 0 comments
Open

Duplicate <li> elements are added to DOM on every click #1

mikekloeden opened this issue Mar 7, 2014 · 0 comments

Comments

@mikekloeden
Copy link

Every click on the switch appends a new li element to the the generated ul.option-list.

It would be better to reuse an element if it already exists in the list and just shuffle its position.

<ul class="option-list" style="-webkit-transform: translate3d(0px, -735px, 0px);">
  <li style="line-height: 21px;">Public</li>
  <li style="line-height: 21px;">Private</li>
  <li style="line-height: 21px;">Draft</li>
  <li style="line-height: 21px;">Scheduled</li>
  <li style="line-height: 21px;">Public</li>
  <li style="line-height: 21px;">Private</li>
  <li style="line-height: 21px;">Draft</li>
  <li style="line-height: 21px;">Scheduled</li>
  <li style="line-height: 21px;">Public</li>
  <li style="line-height: 21px;">Private</li>
  <li style="line-height: 21px;">Draft</li>
  <li style="line-height: 21px;">Scheduled</li>
  <li style="line-height: 21px;">Public</li>
  <li style="line-height: 21px;">Private</li>
  <li style="line-height: 21px;">Draft</li>
  <li style="line-height: 21px;">Scheduled</li>
  <li style="line-height: 21px;">Public</li>
  <li style="line-height: 21px;">Private</li>
  <li style="line-height: 21px;">Draft</li>
  <li style="line-height: 21px;">Scheduled</li>
  <li style="line-height: 21px;">Public</li>
  <li style="line-height: 21px;">Private</li>
  <li style="line-height: 21px;">Draft</li>
  <li style="line-height: 21px;">Scheduled</li>
  <li style="line-height: 21px;">Public</li>
  <li style="line-height: 21px;">Private</li>
  <li style="line-height: 21px;">Draft</li>
  <li style="line-height: 21px;">Scheduled</li></ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant