September 26, 2012

SharePoint: Adding “More…” link to CQWP using jQuery


When using CQWP, how to add “More…” link to the bottom of CQWP.


One of the easiest ways is to use jQuery. Within CEWP on the page, or in a separate JavaScript file, add the following JavaScript:

$("#" + $('td[title*="MYWEBPARTTITLE"]').attr("id").replace("Title", "") + " > div > ul").append("<li><a href='/news'>More...</a></li>");

Where MYWEBPARTTITLE is the…well…how would I say it, it’s the title of your web part!

Technorati Tags: ,

1 comment:

  1. You show here very easiest way for this example using jQuery,which will help to the beginners as well as and I try on my application also.