help with show/hide text on hover

help with show/hide text on hover

I am not sure the best or most elegant way to do this. What I am trying now isn't working. Essentially, I have a horizontal row of icons and when a user hovers over the icons I want text to display in a div to the right of the icons with the text being unique per each icon.

My solution isn't very elegant (and doesn't work), because for each icon I would need to write a separate function, and also a separate paragraph ID, so I am hoping for suggestions to a better solution.

Here is what I have attempted:

  1. //JQuery
  2. (function($){
  3. $(document).ready(function(){
  4. $(".btn-theme_all").hover(function() {$("p#AllText").toggle();
  5. });
  6. })(jQuery);

  7. //HTML
  8. <ul>
  9.                               <li><a href="#" class="btn-theme_all" data-filter="*">ALL</a></li>
  10.                               <li><a href="#" class="btn-theme_web" data-filter=".webdesign"></a></li>
  11.                               <li><a href="#" class="btn-theme_writing" data-filter=".writing"></a></li>
  12.                               <li ><a href="#" class="btn-theme_sandbox" data-filter=".sandbox"></a></li>
  13.                             </ul>
  14.                           </nav>
  15. <div id="PortfolioInfo"><p id="AllText">All of my portfolio including web, writing and sandbox</p></div>



  16. //CSS
  17. #PortfolioInfo{
  18. background-color:#eee;
  19. text=align:center;
  20. padding:10px;
  21. width:250px;
  22. height:250px;
  23. color:#333;
  24. font-weight:bold;
  25. border:3px solid #ccc;
  26. position:absolute;
  27. right:0;
  28. border-radius:5px;
  29. margin-right:50px;
  30. }

  31. p#AllText{
  32. display:none;
  33. }