Is there anyway in prettyphoto for me to pass a parameter to the callback function
This is my current setup
<link rel="stylesheet" href="/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
<script src="/js/jquery.prettyPhoto2.js" type="text/javascript" charset="utf-8">
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({
callback: function()
{
$.post('/course/close-video', {topic_id: '13'});
}
});
});
</script>
<a href="/course/play-video/topic_id/<?php echo $topic->topic_id;?>?iframe=true&width=470&height=340" rel="prettyPhoto" title="<?php echo $topic->topic_name;?>">
<img src="/images/videos/" width="170" height="103" alt="topic_name;?>"/>
</a>
Note: I've hardcoded the topic value as 13 in the callback - but thats something that should come based on which link is clicked.
There are multiple of those a href tags in the page and each one has a unique topic_id
So how can I pass that unique topic_id to the callback function
Thanks much