Hello,
I am not completely sure what you would like to achieve, so, could you please describe your request in more detail.
jQuery as a javascript library can be primarily used to get and change elements in the rendered HTML content.
I will give you simple example that you can use to create a link that allows users to hide and display div that contains all latest blogs posts. To display the latest posts you can use the repeater with a correct Where condition. Then, you need to set the Content after/before properties of the Repeater web part as shown here:
Content Before: <div id="latestBlogs" class="classDisableBlogs" >
Content After: </div>
The CSS styles definition for the
classDisableBlogs class can look like the following one:
.classDisableBlogs{ display:none; }
This simply disables that latest blog posts after the page is displayed.
However, you can add the following jQuery code along with the link to the page:
<script type="text/javascript">
$(document).ready(function(){
$(".lnkDisplayBlogs").click(function(event) {
event.preventDefault();
$("#latestBlogs").toggleClass("classDisableBlogs");
})
})
</script>
<a class="lnkDisplayBlogs" href=""> Display latest blog posts </a>
As a result, after the link has been clicked, the CSS class
classDisableBlogs is removed and the div with all blog posts is displayed.
Best regards,
Michal Legen