$(document).ready(function() {
$('.colors').each(function() {
var i = this.id.substring(1);
$('#a' + i).bubbletip($('#tip' + i));
});
});
I am generating the anchor and tip dynamically, so I create the bubbletips by selecting all the objects in the class (which are the a1_up or a2_down, etc), snipping off that 'a' with substring, and making my selectors that way.
It all works 100% fine on the first load, just like yours, but after the first postback, they all stop working. I thought initially my problem was the opposite of yours, that they only got created once, since $(document).ready doesn't fire after partial page updates.
I tried it as:
function pageLoad() {
$('.colors').each(function() {
var ii = this.id.substring(1);
$('#a' + ii).bubbletip($('#tip' + ii));
});
}
so that it gets called on both the initial load and partial loads, but it doesn't fix it.
If I remove the UpdatePanel from the page, it works every time.