Although I am using swfobject in this sample, it is a question for parents more than it is about the plugin.
Here is my js:
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery.swfobject.1-0-7.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function () {
$('blockquote').flash({
swf: 'copyButton.swf',
height: 30,
width: 130,
flashvars: {
txtToCopy: $('#post-144 blockquote').text()
}
});
});
</script>
And the html:
<div id="post-144">
<div class="entry">
<blockquote><p>text to copy</p></blockquote>
</div>
</div>
It looks for every instance of <blockquote> and adds a copy of the swf to it. In the flashvars the value of textToCopy works if I give it the id of the div (as in the example), but a I need to find the text in the <blockquote> based on the location of the swf. Something like this.parent.text - but all variations of this I've tried don't work. What am I missing?