fix: [enrichment view] Making sure the document is ready before calling any javascript

pull/3660/merge
chrisr3d 2019-03-29 18:31:27 +01:00
parent ba5ec4ee46
commit 0b422b54d8
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 8 additions and 6 deletions

View File

@ -184,11 +184,13 @@
echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'event', 'menuItem' => $menuItem));
?>
<script type="text/javascript">
$('.distributionToggle').change(function() {
if ($(this).val() == 4) {
$(this).next().show();
} else {
$(this).next().hide();
}
$(document).ready(function() {
$('.distributionToggle').change(function() {
if ($(this).val() == 4) {
$(this).next().show();
} else {
$(this).next().hide();
}
});
});
</script>