3

I am trying to add a list item with attributes but every time I run it I get an error. Do you know guys what is the syntax issue with my code?

<div class="subway-map" data-columns="12" data-rows="10" data-cellSize="40" data-legendId="legend" data-textClass="text" data-gridNumbers="true" data-grid="true" data-lineWidth="8">
    <ul data-color="#ff4db2" data-label="jQuery Widgets">          
        <li data-coords="2,2"><a href="#">North Ave</a></li>
        <li data-coords="4,2"><a href="#">South</a></li>
        <li data-coords="6,2"><a href="#">West</a></li>
    </ul>

    <ul data-color="red" data-label="jQuery Interactions" class="map2></ul>
</div>      
$(".subway-map").subwayMap({ debug: true });
$(".map2").append("<li data-coords="2,4">Test</li>"); // This is the issue
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
JessieBear
  • 133
  • 1
  • 14