For one, the tips variable isn't in scope. You declared it as a far in the
do ready fnctin, so you need to expose it somehow for the other function to
use it.
On Oct 28, 2011 3:15 AM, "mattfacer" <[email protected]> wrote:
> Hi - I'm having some trouble with adding tips to a Request.HTML
> function. I have a div which refreshes its content every 30 seconds.
> The content returned has a series of divs with the class name
> ".liveReader".
>
> Here's the JS I have to initiate the content
>
> window.addEvent('domready', initLiveContent);
>
> function initLiveContent()
> {
> var tips = new Tips('.liveReader');
> (function() { refreshPanel() }).periodical(10000);
> refreshPanel();
> }
>
> function refreshPanel()
> {
> var myRequest = new Request.HTML({
> url:
> '/inc/liveFeed.aspx',
> update:
> $(''),
> method:
> 'get',
> onComplete:
> function() {
>
> tips.attach('.liveReader');
> }
> });
> myRequest.send();
> }
>
> So the HTML is
>
> <div id="liveContent">
> <div id="item1" class="liveReader" title="item 1"><p>Text
> 1</p></
> div>
> <div id="item2" class="liveReader" title="item 2"><p>Text
> 2</p></
> div>
> </div>
>
> Yet all I am seeing is the normal tooltip title! any ideas?!!