Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

Remove the link from the web part title and set its cursor to normal

$
0
0

I'm using a list in SharePoint, and when I insert the web part, the title of the web part is a link. I know that I can remove the actual link by using "#" in the title URL, but I also want to remove the link effect (underline and hand cursor). Now, I've found two different jQuery codes to use to make this happen. The first one, from here uses:

jQuery(document).ready(function () {
  
       $('a').filter("[href='###']").each(function () {
        $(this).replaceWith($(this).html());
       });
  

 });

The second one from here uses:

$(document).ready(function() {

  // Remove the link from the web part title and set its cursor to normal.
  $('.ms-WPTitle > a').contents().unwrap().css('cursor','default');
  $('.ms-WPTitle').css('cursor','default');

});


Problem is, I have no idea how to make this work in SharePoint. Using Designer is not an option. How can I put one of these jQuery codes into a JS script?

Thank you!


Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>