Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- .cursor{
- background:red;
- }
- </style>
- <div id="parent" style="width:100%; position:relative;">
- {{image}}
- </div>
- <ol id="elements">
- </ol>
- <script>
- $(function(){
- var arr = {{liste_curseurs:__raw}};
- $("#elements").empty();
- arr.forEach(function(elem){
- $("#elements").append("<li>"+elem.description+"</li>");
- $("#parent").append("<div class='cursor' style='position:absolute; top:"+elem.posY+"%; left:"+elem.posX+"%'>"+elem.title+"</div>");
- })
- })
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement