KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to create div elements and print items on to them dynamically. I've created a demo to show where I've reached. The issue with my code is that it doesn't show up right next to the list where I want it. Instead it is displayed at the bottom. Is it possible to show the new div right next to the element that I'm hovering over? $(".bubble").live({ mouseenter : function() { $("#bubble").show(); $("#bubble").html($(this).attr('id')); }, mouseleave : function() { $("#bubble").empty(); } }); #bubble{ width:100px; height:20px; background-color:#666666; position:absolute; display:hidden; } <ul> <li><span class="bubble" id="test1">test1</span></li> <li><span class="bubble" id="test2">test2</span></li> <li><span class="bubble" id="test3">test3</span></li> <li><span class="bubble" id="test4">test4</span></li> <li><span class="bubble" id="test5">test5</span></li> </ul> <div id="bubble"></div>
Tags (comma-separated)
Save Edits
Cancel