Linking to lightbox

Linking to lightbox

Hi all. This is more just javascript, but since I'm using, and learning jquery perhaps someone can help with this simple question.

I'm using fancybox to display inline content, but the can't get the function right to open only the fancybox. Every link on the page opens the lightbox, not just the div I want. I understand why, but can't get the syntax right.

The inline content is inside
<div id="data">


So in the header I have

<script type="text/javascript">
$(document).ready(function() {
$("a.data").fancybox();
});
</script>


I've tried some comdinations but not working. I want only that div with the id of data to open the fancybox.

What syntax do I use to make that div id work?

Thanks.