http://www.no-margin-for-errors.comの PrettyPhoto 3.1.4 を使用しています。
ASP.NET MVC3 でコンテンツ ハンドラーを使用して、データベースから画像を読み込みます。Pretty Photo は、API を使用して画像をロードしていません。コンテンツ ハンドラーで動作させるにはどうすればよいですか?
画像のギャラリーをポップアップする画像は次のとおりです。
<a href='' onclick="$.prettyPhoto.open(api_images0,api_titles0,api_descriptions0);" title='UFC123'>
<img style="max-height: 160px;max-width: 260px;" id='Img31' alt='UFC123' title='UFC123' src='/img.ashx?mediaId=31' style='padding:10px' />
</a>
私が使用しているスクリプトは次のとおりです。
<script type="text/javascript" charset="utf-8">
var api_images0 = ['/img.ashx?mediaId=33'];
var api_titles0 = ['Gina'];
var api_descriptions0 = ['Gina Description'];
</script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function () {
$("a[rel^='prettyPhoto']").prettyPhoto({ theme: 'dark_rounded', social_tools: '' });
});
</script>