SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been trying to edit links within lists to change their overall functionality, but have had no luck with changing any property of the links' functions. The properties I have tried to change thus far are the text-decoration and the href destination. This is my code for attempting to change the href destination.

$(".ms-vb2 a, .ms-vb-title a, .ms-vb-user a").each(function () {
    var itemText = $(this).text();
    $(this).html("<a href=''>" + itemText + '</a>');

The idea is that I want all of the links to hold the text of the original SharePoint list items, but to link me to something other than a list actions menu. An additional note: I have been able to change text properties, such as font color, but not link properties, such as href.

share|improve this question
up vote 0 down vote accepted
$(".ms-vb2 a, .ms-vb-title a, .ms-vb-user a").each(function () {

    //Cache the current A tag.
    var currentA = $(this);

    //Use any one of the following to remove the old href.

    //Use this to add your new href to the same link.

share|improve this answer
I've had some success with this, so I'll start here and keep messing with it. Thanks for the help! – Gaiadok Sep 1 '12 at 14:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.