I have to make a summary of locations with google maps API. On the map there are letters corresponding to the waypoints, I have a separate <div>
with all the route information.
Right now I have it set as an <ul>
, I want to make it an <ol>
with letters. However, since the starting location isn't included in the route information and it has a marker with A on the map my route information needs to start with B.
Is there a way to do this?
I have tried making a list item before the rest with display: none
.
I tried using the start
attribute.
I tried using the value
attribute in bination with a JavaScript array.
<ol id="sortable" class="directions-panel list-container list" type="A">
<li style="display:none;"></li>
</ol>
<ol id="sortable" class="directions-panel list-container list" type="A" start="B"></ol>
<ol id="sortable" class="directions-panel list-container list" type="A">
<li value="B"></li>
</ol>
I have to make a summary of locations with google maps API. On the map there are letters corresponding to the waypoints, I have a separate <div>
with all the route information.
Right now I have it set as an <ul>
, I want to make it an <ol>
with letters. However, since the starting location isn't included in the route information and it has a marker with A on the map my route information needs to start with B.
Is there a way to do this?
I have tried making a list item before the rest with display: none
.
I tried using the start
attribute.
I tried using the value
attribute in bination with a JavaScript array.
<ol id="sortable" class="directions-panel list-container list" type="A">
<li style="display:none;"></li>
</ol>
<ol id="sortable" class="directions-panel list-container list" type="A" start="B"></ol>
<ol id="sortable" class="directions-panel list-container list" type="A">
<li value="B"></li>
</ol>
Share
Improve this question
edited Jun 25, 2019 at 12:06
VLAZ
29.1k9 gold badges63 silver badges84 bronze badges
asked Jun 25, 2019 at 11:36
Patrick de RondePatrick de Ronde
531 silver badge6 bronze badges
2
-
6
Use start
start=2
instead ofstart="B"
– Walk Commented Jun 25, 2019 at 11:39 - this works! thanks! @Walk – Patrick de Ronde Commented Jun 25, 2019 at 11:41
1 Answer
Reset to default 5You were close - the start
attribute accepts a number as the starting position, regardless if the list displays letters or numbers. All you need is start="2"
:
<ol id="sortable" class="directions-panel list-container list" type="A" start="2">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>