I further simplified the problem by removing the jqModal component, so
my problem appears to be with Flowplayer and AJAX. When you click the
link, the script loads new html, and then a callback function
instantiating Flowplayer, as well as triggering an alert from a new
link.

The first time the AJAX loads, Flowplayer appears properly and the
alert triggers properly. But on subsequent loads, the alert still
triggers properly, but Flowplayer does not appear.

Any help is greatly appreciated! The code is below.

1. index.html

<body>
    <a id="ajaxLink">Get new AJAX content</a>
    <div id="ajax"></div>
</body>

2. ajax.html

<a id="player"></a>
<a id="getAlert">Click for alert</a>

3. ajax.js

var loadFlowplayer = function() {
    $("#player").flowplayer("/swf/flowplayer-3.0.2.swf", {
        clip: {
            url: '/video/ab_raise.flv',
            autoPlay: false
        }
    });
    $('#getAlert').click(function() {
        alert('Callback binding properly');
        return false;
    });
}

$(document).ready(function() {
    $('#ajaxLink').click(function() {
        $('#ajax').load('ajax.html', loadFlowplayer);
        return false;
    });
});



Cheers, and happy holidays!

Jeff

Reply via email to