Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- globalMagnificPopup.open({
- type: 'ajax',//ポップアップするコンテンツの種類
- fixedContentPos: true,//ポップアップコンテンツにposition:fixed;が適用される
- fixedBgPos: true,//背景オーバーレイのposition:fixed;が適用される
- alignTop: true,//ポップアップは中央にではなく上に揃えらる
- showCloseBtn: false,//クローズボタンが表示されない
- closeOnContentClick: false,//コンテンツをクリックしてもポップアップが閉じない
- closeOnBgClick: true,//背景のオーバーレイをクリックするとポップアップが閉じる
- items: [
- {//ポップアップさせるコンテンツのソース(画像へのパス、HTMLファイルへのパス、ビデオページへのパス・URLなど)を指定(定義)
- src: this_instance.getAttribute('valueUrl')
- }
- ],
- ajax: {
- settings: {cache:false, async:true},
- cursor: 'mfp-ajax-cur', // ポップアップで表示されたときにbodyに追加されるクラス
- tError: '<a href="%url%">The content</a> could not be loaded.', // ローディングが失敗したときのエラーメッセージ
- },
- callbacks: {//ローディング後にコンテンツを変更したり、特定の要素だけを表示したり出来る
- parseAjax: function(mfpResponse) {//特定の要素だけを表示
- },
- ajaxContentAdded: function() {//クラスと要素を足す
- closeBtn(this);
- orgSelectBtn(this);
- }
Add Comment
Please, Sign In to add comment