Search code examples
javascriptjquerysharepointsharepoint-designer

How to disable hover text boxes on entire SharePoint survey page?


Being new to both SharePoint and JQuery, I have been experimenting with Content Editor Web Parts in SharePoint, as a means to make more complex changes to my created SharePoint survey than what is available out of the box.

On my survey page, whenever one hovers the mouse over the multiple choice radio buttons, comment boxes, or any other place for responses, a text box appears with the question text. I am trying to disable/completely hide this functionality for the entire survey page.

I've found a few examples online, but none of the JQuery code I find to enter into the web part seem to have any effect for this particular problem (I already have a few other web parts that do work). I doubt the code would be more than a few lines, but again, I'm completely new to the language. Any help is appreciated.


Solution

  • You could delete the title attribute of all elements with title attribute on the page.

    Demo:

    <script src="https://code.jquery.com/jquery-1.11.0.min.js"> </script>
    <script type="text/javascript">
    
    $(document).ready(function() {
    $("[title]").removeAttr('title')
    });
    </script>