Search code examples
htmlsharepointmouseoverweb-parts

Change mouse over with HTML source


On a SharePoint page I have this:

SPSite

I want the mouse to change when the mouse goes over "Ulm", "Oberkochen" etc.

When I edit the webpart and click on Edit Source, the following shows up:

<style>


.dd13 { 
 color: #FFFFFF;
 Font: 12px Arial
 background-color:: #48A040;
 Padding: 3px 3px 3px 3px;


}

</style><script>
function openLink(url) {


  window.open(url);
}


</script> 
<table class="dd13"> 
   <tbody>
      <tr> 
         <td onclick="openLink(&#39;mysite.aspx?locations=Ulm&#39;);" class="dd13" style="background-color: #48a040;">Ulm</td>
         <td style="background-color: #ffffff;">&#160;</td> 
         <td onclick="openLink(&#39;mysite.aspx?locations=Oberkochen&#39;);" class="dd13" style="background-color: #48a040;">Oberkochen</td>
         <td style="background-color: #ffffff;">&#160;</td> 
         <td onclick="openLink(&#39;mysite.aspx?locations=Taufkirchen&#39;);" class="dd13" style="background-color: #48a040;">Taufkirchen</td>
         <td style="background-color: #ffffff;">&#160;</td> 
         <td onclick="openLink(&#39;mysite.aspx?locations=Wetzlar&#39;);" class="dd13" style="background-color: #48a040;">Wetzlar</td>
         <td style="background-color: #ffffff;">&#160;</td> 
         <td onclick="openLink(&#39;mysite.aspx?locations=Friedrichshafen&#39;);" class="dd13" style="background-color: #48a040;">Friedrichshafen</td>
         <td style="background-color: #ffffff;">&#160;</td> 
         <td onclick="openLink(&#39;mysite.aspx?locations=Kiel&#39;);" class="dd13" style="background-color: #48a040;">Kiel</td>
         <td style="background-color: #ffffff;">&#160;</td> 
         <td onclick="openLink(&#39;mysite.aspx?locations=%25C3%25B6&#39;);" class="dd13" style="background-color: #48a040;">Köln</td>
      </tr> 
   </tbody>
</table> 
<p> 
   <br/>To register yourself to a seminar please click on this icon 
   <a title="Book for me" class="book-for-me-button"></a>. To register someone else to a seminar, please click on this icon 
   <a title="Book for me" class="book-for-user-button"></a>.<br/></p> 

I wasn't able to find anything on the Internet, but does someone know what I have to write in the source to get the mouse to change whenever the mouse hovers over "Ulm" etc.?


Solution

  • Use this css code for changing mouse hover effect According to your code you can write in style in two conditions.

    table class="dd13" & td class="dd13" both are same.    
    
    <style>
    
    table.dd13:hover {cursor: pointer;}
    
    /*OR*/
    
    td.dd13:hover {cursor: pointer;}
    
    </style>
    

    [Link Different Cursors] : https://www.w3schools.com/cssref/pr_class_cursor.asp