?
Solved

Change list to divs

Posted on 2013-01-08
2
Medium Priority
?
161 Views
Last Modified: 2013-01-11
Ive been trying to figure out a simple way of taking a list and converting it to divs

So if I had an unordered list:-
<ul style="rounded">
 <li>Coffee</li>
 <li>Milk</li>
</ul> 

Open in new window


Which would convert to:-
<div style="rounded">
 <div>Coffee</div>
 <div>Milk</div>
</div> 

Open in new window


I've found some articles that suggest using .map but I cant find anything really that describes how it can work.

My idea is to copy the jQuery UI Tab idea where clicking on a div will open another div.

Does anyone have any suggestions, or examples?
0
Comment
Question by:tonelm54
[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
2 Comments
 
LVL 8

Accepted Solution

by:
soupBoy earned 2000 total points
ID: 38757044
There is probably a better way to do this, but check out this little fiddle I just created: Convert an unordered list and it's list items to DIVs

- Chris
0
 

Author Comment

by:tonelm54
ID: 38769043
Wondering if you could look at a new question I've posted, related to this, which is my attempt of doing this, with your code but I cannot figure out where I'm going wrong

Q_27992940

Thank you for your help
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to dynamically set the form action using jQuery.
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…
Suggested Courses

762 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