Thursday, October 3, 2013

Custom Callouts in the SharePoint 2013 Metro UI, Part 6: How to update custom callout content on its opening

Previous: Custom Callouts in the SharePoint 2013 Metro UI, Part 5: Modification of the Document Library Item Callout Content
Back to contents.


How to update custom callout content on its opening

Summary

This article describes my approach to modification of the content inside the custom callout in real time - on every opening.

The Problem

Recently I was asked a question: is there any way to update custom callout's content on every opening because it's a quite useful and realistic scenario.

The Solution

I've made some research and have found that there's an addEventCallback method that allows us to subscribe to some events in the callout's lifecycle. Here's my solution: http://pastebin.com/ZM4Xs7Zj Please note that there are 4 available events: 'opening', 'opened', 'closing' and 'closed'. Another important part is that you have to find the element with the specific generated ID to change the real content of the callout without break of the other structure elements such as title and close button.

6 comments:

  1. Hi..
    Your code help me a lot. I was not able to attach the callback somehow..
    But this post helped me a lot..

    Thanks,
    Keep posting some new posts.

    ReplyDelete
  2. Links are offered to facilitate the dissemination of information 카지노 사이트 to basic public} about drawback playing and playing disorder. The Nevada Council won't knowingly present hyperlinks to online playing websites, but encourages all Nevada gaming operators to supply hyperlinks from their websites to ours, for the benefit of|the good thing about|the advantage of} their clients and basic public} at giant. For questions or additional details about our website policies, please e mail us at

    ReplyDelete
  3. The regulations for each recompense, properly as|in addition to} participant preferences and on line casino operations, differ. As a result, each gambler needs a 퍼스트카지노 guide to assist them choose the best bonus on line casino. In other phrases, do not have|you don't have} to lose your real cash earlier than you can begin turning over your bonus to convert it into real cash. The commonplace wagering requirement for a bonus like that is 30x.

    ReplyDelete