With a lot of help from stackoverflow users I wrote a script that works like in the demo below:
The problem is to populate the ul#selected_items with the data from h2 in consecutive order when the page loads. As you can see now the ul#selected_items are inscribed manualy and I need them to be populated dynamicaly on pageload.
I’m quite new to jQuery and been trying to figure this one out for a while now with no results. We’ll appreciate any help.
You want to create the
lis dynamically on page load?Then remove them from the
ulin your html and add this javascript:Also see your updated example.