Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to move list item (li) to specifi location?

Posted on 2008-10-13
3
Medium Priority
?
474 Views
Last Modified: 2008-11-29
I have a ordered list. I need to know how to move an item to specific location in list?

Like thru java script if I want to move item 1 to position 10 in list, how do i do that?

Also If there is already an item at position 10, then I want to push down all items after position 10 .

Please help
0
Comment
Question by:immtrac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Expert Comment

by:MMDeveloper
ID: 22706086
0
 
LVL 1

Expert Comment

by:andrewmilo
ID: 22706151
Do you mean interactively, or programatically?
0
 

Accepted Solution

by:
immtrac earned 0 total points
ID: 22706209
programatically..!

e.g.

I will ask user where he want to move item. If he says i wan to move item on position 10, I want to pass the position no. to a JS function and then move item on that position. If the spot is already occupied, push that item (and all items after ) down.

Thanks
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question