Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Is it possible to show slides on a certain day of the week? #2512

Closed
anthonyjdella opened this issue Oct 16, 2019 · 2 comments
Closed

Is it possible to show slides on a certain day of the week? #2512

anthonyjdella opened this issue Oct 16, 2019 · 2 comments

Comments

@anthonyjdella
Copy link

Throwing this out there, but is it possible to have a slide appear at a certain day of the week?

Example, on every Friday, a specific slide is shown.

@ayhankesicioglu
Copy link

<?php if ( date("l") == "Friday" ) { ?>
<section id="Friday">
  <h5>Friday Slide</h5>
  Lorem ipsum...
</section>
<?php } ?>

@anthonyjdella
Copy link
Author

anthonyjdella commented Oct 18, 2019

<?php if ( date("l") == "Friday" ) { ?>
<section id="Friday">
  <h5>Friday Slide</h5>
  Lorem ipsum...
</section>
<?php } ?>

Thanks! I tried with JS and it works like this work:

<section id="content"></section>

<script>
var el = document.getElementById('content');
var content;

if (new Date().getDay() == 5 ) {
    '<section> Its Friday </section>'
}
else {
    '<section> Its NOT Friday </section>'
}

el.insertAdjacentHTML('afterbegin', content);
</script>

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants