Server error! Check the console for details :(

How to expire an item when it's date has passed

This guide will show you how to put in a jQuery snippet that will allow you to have your item expire once a certain date has passed, whether it be an announcement, event, etc.

  1. Need to have a8b.webform.js on site in some fashion
  2. In a script block:
                    A8B.jQexpiring();
                
    (the A8B.jQexpiring(); line can be thrown into an existing jQuery function, if there's already one present)

  3. Start your item that will date expire with:

    <div class="jQexpiring" data-start="DateGoesHere data-end="DateGoesHere">

    Replace "DateGoesHere" with the date range you want the item to start and stop appearing, in the form of: YYYY-MM-DD.
    When you come across expired items in the course of working on a site, go ahead and remove them.

    Note, the date is 1 second after midnight the moment it becomes that date. So a start and stop time of 20XX-01-01 to 20XX-01-30 will display the item the moment the date becomes Jan 1st and hide the item the moment the date becomes Jan 30th.

  4. add to stylesheet: .jQexpiring {display:none;}