Created
February 20, 2017 09:51
-
-
Save elricco/a2bddb994a7a21152c65743829a2ebce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
IM HEAD | |
############ | |
<script> | |
var elricco = {}; | |
elricco.funcs = []; | |
</script> | |
MODULAUSGABE | |
############ | |
<?php if (!rex::isBackend()): ?> | |
<script> | |
elricco.funcs.push(function () { | |
// hier dein Code, jQuery/$ ist verfügbar | |
}); | |
</script> | |
<?php endif; ?> | |
NACH JQUERY | |
############ | |
<script> | |
'use strict'; | |
jQuery(function ($) { | |
$.each(elricco.funcs, function (idx, func) { | |
func(); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment