Sha256: 408630464badb7c938aefa4396b2e8e513b30639393687cdcf416a1c47f48656

Contents?: true

Size: 1.03 KB

Versions: 10

Compression:

Stored size: 1.03 KB

Contents

###
 * Requires jquery.magnific-popup.js
###
$ ->
  # single image
  $(
    ".modal.image, 
     .modal[href*='.jpg'], 
     .modal[href*='.jpeg'], 
     .modal[href*='.gif'], 
     .modal[href*='.png']"
    ).magnificPopup(
      type: 'image'
    )
  
  # image gallery
  $(".modal.gallery").magnificPopup(
    delegate: 'a'
    type: 'image'
    image: 
      titleSrc: 'title'
    gallery: 
      enabled: true
  )

  # inline content
  $(".modal[href^='#']").magnificPopup(
      type: 'inline'
      mainClass: 'inline-modal'
  )

  # external content
  $("a.modal[href^='http']").not(".image").not("[href*='.jpg']").not("[href*='.jpeg']").not("[href*='.gif']").not("[href*='.png']").magnificPopup(
    type: 'iframe'
    height: '100%'
  )

  # video content
  $("a.video.modal[href^='http']").magnificPopup(
    type: 'iframe'
  )

  # ajax content
  $("a.modal[href]").not("[href^='#']").not(".image").not("[href^='http']").not("[href*='.jpg']").not("[href*='.jpeg']").not("[href*='.gif']").not("[href*='.png']").magnificPopup(
    type: 'ajax'
  )

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
groundworkcss-0.4.4 app/assets/javascripts/groundworkcss/components/modals.coffee
groundworkcss-0.4.3 app/assets/javascripts/groundworkcss/components/modals.coffee
groundworkcss-0.4.2 app/assets/javascripts/groundworkcss/components/modals.coffee
groundworkcss-0.4.1 app/assets/javascripts/groundworkcss/components/modals.coffee
groundworkcss-0.4.0 app/assets/javascripts/groundworkcss/components/modals.coffee
groundworkcss-0.3.2 app/assets/javascripts/groundworkcss/components/modals.coffee
groundworkcss-0.3.0 vendor/assets/javascripts/groundworkcss/components/modals.coffee
groundworkcss-0.2.4 vendor/assets/javascripts/groundworkcss/components/modals.coffee
groundworkcss-0.2.3 vendor/assets/javascripts/groundworkcss/components/modals.coffee
groundworkcss-0.2.2 vendor/assets/javascripts/groundworkcss/components/modals.coffee