jQuery Media Plugin - results to a different tag
Good afternoon!
I'm trying to use the jQuery Media Plugin from
http://malsup.com/jquery/media/#overview and I would like to have the results go to a div instead of replacing the <a> tag. I'm new to jQuery but am learning fast. VERY awesome library! This is what I have set up: a file tree (using jqueryFileTree) that they user can navigate and click on a music file. The default action, as explained in the plugin link above is to turn:
<a class="media" href="/path_to_file/filename">File Name</a> into
<div class="media">
<object codebase="http://www.apple.com/qtactivex/qtplugin.cab"
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B">
<param name="src" value="sample.mov">
<embed src="sample.mov"
pluginspage="http://www.apple.com/quicktime/download/"></embed>
</object>
<div>My Quicktime Movie</div>
</div>
This works for me, but throws the player into my tree. I have the screen split, like so:
<div id="smallbrowser" style="float: left; width: 300px;"></div>
<div id="divMedia" class="media" style="float: right; width: 600px;">
What I would like is to have the player control show up in "divMedia" instead of the tree. I tried:
$("#smallbrowser").fileTree({
root: 'music/',
script: '../jqueryMusicTree.php',
expandSpeed: 100,
collapseSpeed: 100,
multiFolder: true
}, function (file) {
$('#divMedia').html = $('.media').media();
}
});
Any ideas?
Robert Lewis