Guest User

Untitled

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