Created
October 18, 2013 15:01
-
-
Save larsmaxwell/7042875 to your computer and use it in GitHub Desktop.
global modal function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Modals for group roster options. | |
*/ | |
Drupal.behaviors.apci_show_hide_roster_options = function(context) { | |
var modals = $('.apci-modal'); | |
$(window).load(function(){ | |
modals.appendTo('body'); | |
}); | |
callOnce('.show-options', 'show-options-processed', context, function(element) { | |
element.click(function(){ | |
var clickedDataRel = $(this).attr('data'), | |
targetDataRel = $('.apci-modal[data=' + clickedDataRel + ']').attr('data'); | |
if (clickedDataRel == targetDataRel) { | |
$('.apci-modal[data=' + targetDataRel + ']').reveal(); | |
return false; | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment