Hi Ruth,
innkeeper9 wrote:...I should use the first part you gave as the function in the same place the other code told me to put that, in the head of the document?
Probably, it would be most convenient to put the function definition right at the top of your menu_data.js file.
The second part I see goes in the menu.
To paraphrase Johnny Carson, "You are correct ma'am."
...And, don't laugh, but a suggestion, about the going through and updating to remove really out of date expired ones, couldn't you...modify it to get it to remove it's own use after the expiration date?
- (This is me not laughing.) It would be nice, but the only way I could think of to do something like that efficiently would be with server-side scripting, which I don't think you're doing. In fact, if you were using server-side scripting, you could use it to accomplish the expiration functionality with no additional overhead on the client. But don't worry about it too much, the slowdown wouldn't be noticable unless you had a TON of new/expired items, and I doubt your menu would get that large... I probably shouldn't have even mentioned it.
I uploaded the example I used to test. To see it, download
mm_timedNew.zip, unzip the file to a new folder, and copy your latest milonic_src.js, mmenudom.js, and mmenuns4.js files into the same folder. To see it in action, open menu.htm. You'll find the function definition in menu_data.js.
Hope that helps,
Kevin