I have searched high and low for an answer to this. I know there is a way to stop propagation when triggering a click event, but is there a way to run the click event code after propagation.
The reason I ask is, I have a telerik RadTabStrip that is built up dynamically on the server. In each tab page is a map which has markers on it indicating where people sit in the office. I need to get a handle on the first marker when the user clicks a tab, but the problem I have is the marker element is not part of the DOM until after the click has propagated.
$('.tab').click(function(e){
// e.continuePropagation(); ?? or something?
var markerTop = $('.cardiff').offSet().top; // Is always 0 even though the marker is 243 px from the top
}):
The reason I am not using the telerik client api is because I am inside a couple of JQuery AJAX success functions and am unsure of how it will behave.
EDIT:
I have solved my problem using another AJAX call, but I am still keen to know whether there is a way to get the default to run before the code in the click event
If by clicking on the Tab it AJAX’s in some content or otherwise with your markers in it you need to put a callback in that code not in the click event of the tab.
I can’t think of way to get hold of content which isn’t yet part of the DOM in the click event callback.
Looking at the TabStrip Documentation you just want to use the OnClientTabSelected event surely? You mention that you are doing some custom Ajax calls but perhaps these could be moved inside of the pre-built telerik events?